-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathremote_wrapper.hpp
More file actions
36 lines (23 loc) · 824 Bytes
/
remote_wrapper.hpp
File metadata and controls
36 lines (23 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include <string_view>
#include <vector>
#include <git2.h>
#include <git2/remote.h>
#include "../wrapper/wrapper_base.hpp"
class remote_wrapper : public wrapper_base<git_remote>
{
public:
using base_type = wrapper_base<git_remote>;
~remote_wrapper();
remote_wrapper(remote_wrapper&&) = default;
remote_wrapper& operator=(remote_wrapper&&) = default;
std::string_view name() const;
std::string_view url() const;
std::string_view pushurl() const;
std::vector<std::string> refspecs() const;
void fetch(const git_strarray* refspecs, const git_fetch_options* opts, const char* reflog_message);
void push(const git_strarray* refspecs, const git_push_options* opts);
private:
explicit remote_wrapper(git_remote* remote);
friend class repository_wrapper;
};