-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathstatus.h
More file actions
54 lines (42 loc) · 1.28 KB
/
Copy pathstatus.h
File metadata and controls
54 lines (42 loc) · 1.28 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include <git2/status.h>
#include <memory>
namespace git
{
struct Status
{
struct Options
{
enum class Show
{
IndexOnly,
WorkdirOnly,
IndexAndWorkdir
};
enum class Sort
{
CaseSensitively,
CaseInsensitively,
};
Options(Show = Show::IndexAndWorkdir, Sort = Sort::CaseSensitively);
Options & include_untracked();
Options & exclude_untracked();
Options & renames_head_to_index();
Options & include_ignored();
Options & recurse_untracked_dirs();
Options & exclude_submodules();
void set_pathspec(char ** ptr, size_t size);
git_status_options const * raw() const { return &opts_; }
private:
git_status_options opts_;
};
size_t entrycount() const;
git_status_entry const & operator[](size_t i) const;
private:
friend struct Repository;
Status(git_repository * repo, Options const & opts);
private:
struct Destroy { void operator() (git_status_list*) const; };
std::unique_ptr<git_status_list, Destroy> status_;
};
}