Skip to content

Commit b72717b

Browse files
committed
pathspec: improve git_pathspec_flag_t doc rendering
By placing docs per enum value rather than in a large block, the automated doc generation tool can make nicer docs, as could other automated tools, such as the mooted libgit2/git2go#427. The current rendering is somewhat ugly: https://libgit2.github.com/libgit2/#HEAD/type/git_pathspec_flag_t No textual changes, just reorganization.
1 parent 809b0ca commit b72717b

File tree

1 file changed

+35
-18
lines changed

1 file changed

+35
-18
lines changed

include/git2/pathspec.h

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,49 @@ typedef struct git_pathspec_match_list git_pathspec_match_list;
2626

2727
/**
2828
* Options controlling how pathspec match should be executed
29-
*
30-
* - GIT_PATHSPEC_IGNORE_CASE forces match to ignore case; otherwise
31-
* match will use native case sensitivity of platform filesystem
32-
* - GIT_PATHSPEC_USE_CASE forces case sensitive match; otherwise
33-
* match will use native case sensitivity of platform filesystem
34-
* - GIT_PATHSPEC_NO_GLOB disables glob patterns and just uses simple
35-
* string comparison for matching
36-
* - GIT_PATHSPEC_NO_MATCH_ERROR means the match functions return error
37-
* code GIT_ENOTFOUND if no matches are found; otherwise no matches is
38-
* still success (return 0) but `git_pathspec_match_list_entrycount`
39-
* will indicate 0 matches.
40-
* - GIT_PATHSPEC_FIND_FAILURES means that the `git_pathspec_match_list`
41-
* should track which patterns matched which files so that at the end of
42-
* the match we can identify patterns that did not match any files.
43-
* - GIT_PATHSPEC_FAILURES_ONLY means that the `git_pathspec_match_list`
44-
* does not need to keep the actual matching filenames. Use this to
45-
* just test if there were any matches at all or in combination with
46-
* GIT_PATHSPEC_FIND_FAILURES to validate a pathspec.
4729
*/
4830
typedef enum {
4931
GIT_PATHSPEC_DEFAULT = 0,
32+
33+
/**
34+
* GIT_PATHSPEC_IGNORE_CASE forces match to ignore case; otherwise
35+
* match will use native case sensitivity of platform filesystem
36+
*/
5037
GIT_PATHSPEC_IGNORE_CASE = (1u << 0),
38+
39+
/**
40+
* GIT_PATHSPEC_USE_CASE forces case sensitive match; otherwise
41+
* match will use native case sensitivity of platform filesystem
42+
*/
5143
GIT_PATHSPEC_USE_CASE = (1u << 1),
44+
45+
/**
46+
* GIT_PATHSPEC_NO_GLOB disables glob patterns and just uses simple
47+
* string comparison for matching
48+
*/
5249
GIT_PATHSPEC_NO_GLOB = (1u << 2),
50+
51+
/**
52+
* GIT_PATHSPEC_NO_MATCH_ERROR means the match functions return error
53+
* code GIT_ENOTFOUND if no matches are found; otherwise no matches is
54+
* still success (return 0) but `git_pathspec_match_list_entrycount`
55+
* will indicate 0 matches.
56+
*/
5357
GIT_PATHSPEC_NO_MATCH_ERROR = (1u << 3),
58+
59+
/**
60+
* GIT_PATHSPEC_FIND_FAILURES means that the `git_pathspec_match_list`
61+
* should track which patterns matched which files so that at the end of
62+
* the match we can identify patterns that did not match any files.
63+
*/
5464
GIT_PATHSPEC_FIND_FAILURES = (1u << 4),
65+
66+
/**
67+
* GIT_PATHSPEC_FAILURES_ONLY means that the `git_pathspec_match_list`
68+
* does not need to keep the actual matching filenames. Use this to
69+
* just test if there were any matches at all or in combination with
70+
* GIT_PATHSPEC_FIND_FAILURES to validate a pathspec.
71+
*/
5572
GIT_PATHSPEC_FAILURES_ONLY = (1u << 5),
5673
} git_pathspec_flag_t;
5774

0 commit comments

Comments
 (0)