forked from AndreyG/libgit2cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.h
More file actions
39 lines (27 loc) · 942 Bytes
/
Copy pathindex.h
File metadata and controls
39 lines (27 loc) · 942 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
37
38
39
#pragma once
#include <functional>
struct git_index;
struct git_repository;
struct git_strarray;
struct git_index_entry;
namespace git
{
struct Index
{
explicit Index(git_repository * repo);
explicit Index(const char * dir);
~Index();
size_t entrycount() const;
git_index_entry const * operator[] (size_t i) const;
typedef std::function<int (const char * path, const char * mathched_pathspec)> matched_path_callback_t;
void update_all (git_strarray const & pathspec, matched_path_callback_t cb);
void add_all (git_strarray const & pathspec, matched_path_callback_t cb, unsigned int flags = 0);
git_oid write_tree() const;
void write() const;
Index (Index const &) = delete;
Index& operator = (Index const &) = delete;
Index(Index && other);
private:
git_index * index_;
};
}