forked from QuantStack/git2cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepository_wrapper.hpp
More file actions
36 lines (23 loc) · 979 Bytes
/
Copy pathrepository_wrapper.hpp
File metadata and controls
36 lines (23 loc) · 979 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>
#include <git2.h>
#include "../wrapper/branch_wrapper.hpp"
#include "../wrapper/commit_wrapper.hpp"
#include "../wrapper/index_wrapper.hpp"
#include "../wrapper/wrapper_base.hpp"
class repository_wrapper : public wrapper_base<git_repository>
{
public:
~repository_wrapper();
repository_wrapper(repository_wrapper&&) noexcept = default;
repository_wrapper& operator=(repository_wrapper&&) noexcept = default;
static repository_wrapper init(const std::string& directory, bool bare);
static repository_wrapper open(const std::string& directory);
index_wrapper make_index();
branch_wrapper create_branch(const std::string& name, bool force);
branch_wrapper create_branch(const std::string& name, const commit_wrapper& commit, bool force);
branch_wrapper find_branch(const std::string& name);
branch_iterator iterate_branches(git_branch_t type) const;
private:
repository_wrapper() = default;
};