1 module deimos.git2.pathspec;
2 
3 import deimos.git2.common;
4 import deimos.git2.types;
5 import deimos.git2.strarray;
6 import deimos.git2.diff;
7 
8 struct git_pathspec {
9 	@disable this();
10 	@disable this(this);
11 }
12 
13 struct git_pathspec_match_list {
14 	@disable this();
15 	@disable this(this);
16 }
17 
18 enum git_pathspec_flag_t {
19 	GIT_PATHSPEC_DEFAULT        = 0,
20 	GIT_PATHSPEC_IGNORE_CASE    = (1u << 0),
21 	GIT_PATHSPEC_USE_CASE       = (1u << 1),
22 	GIT_PATHSPEC_NO_GLOB        = (1u << 2),
23 	GIT_PATHSPEC_NO_MATCH_ERROR = (1u << 3),
24 	GIT_PATHSPEC_FIND_FAILURES  = (1u << 4),
25 	GIT_PATHSPEC_FAILURES_ONLY  = (1u << 5),
26 }
27 
28 int git_pathspec_new(
29 	git_pathspec **out_, const(git_strarray)* pathspec);
30 void git_pathspec_free(git_pathspec *ps);
31 int git_pathspec_matches_path(
32 	const(git_pathspec)* ps, uint32_t flags, const(char)* path);
33 int git_pathspec_match_workdir(
34 	git_pathspec_match_list **out_,
35 	git_repository *repo,
36 	uint32_t flags,
37 	git_pathspec *ps);
38 int git_pathspec_match_index(
39 	git_pathspec_match_list **out_,
40 	git_index *index,
41 	uint32_t flags,
42 	git_pathspec *ps);
43 int git_pathspec_match_tree(
44 	git_pathspec_match_list **out_,
45 	git_tree *tree,
46 	uint32_t flags,
47 	git_pathspec *ps);
48 int git_pathspec_match_diff(
49 	git_pathspec_match_list **out_,
50 	git_diff *diff,
51 	uint32_t flags,
52 	git_pathspec *ps);
53 void git_pathspec_match_list_free(git_pathspec_match_list *m);
54 size_t git_pathspec_match_list_entrycount(
55 	const(git_pathspec_match_list)* m);
56 const(char)* git_pathspec_match_list_entry(
57 	const(git_pathspec_match_list)* m, size_t pos);
58 const(git_diff_delta)* git_pathspec_match_list_diff_entry(
59 	const(git_pathspec_match_list)* m, size_t pos);
60 size_t git_pathspec_match_list_failed_entrycount(
61 	const(git_pathspec_match_list)* m);
62 const(char)* git_pathspec_match_list_failed_entry(
63 	const(git_pathspec_match_list)* m, size_t pos);