Skip to content

Commit 709359c

Browse files
pcloudsgitster
authored andcommitted
dir.h: move struct exclude declaration to top level
There is no actual nested struct here. Move it out for clarity. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Karsten Blees <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d961baa commit 709359c

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

dir.h

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,27 @@ struct dir_entry {
1515
#define EXC_FLAG_MUSTBEDIR 8
1616
#define EXC_FLAG_NEGATIVE 16
1717

18+
struct exclude {
19+
/*
20+
* This allows callers of last_exclude_matching() etc.
21+
* to determine the origin of the matching pattern.
22+
*/
23+
struct exclude_list *el;
24+
25+
const char *pattern;
26+
int patternlen;
27+
int nowildcardlen;
28+
const char *base;
29+
int baselen;
30+
int flags;
31+
32+
/*
33+
* Counting starts from 1 for line numbers in ignore files,
34+
* and from -1 decrementing for patterns from CLI args.
35+
*/
36+
int srcpos;
37+
};
38+
1839
/*
1940
* Each excludes file will be parsed into a fresh exclude_list which
2041
* is appended to the relevant exclude_list_group (either EXC_DIRS or
@@ -32,26 +53,7 @@ struct exclude_list {
3253
/* origin of list, e.g. path to filename, or descriptive string */
3354
const char *src;
3455

35-
struct exclude {
36-
/*
37-
* This allows callers of last_exclude_matching() etc.
38-
* to determine the origin of the matching pattern.
39-
*/
40-
struct exclude_list *el;
41-
42-
const char *pattern;
43-
int patternlen;
44-
int nowildcardlen;
45-
const char *base;
46-
int baselen;
47-
int flags;
48-
49-
/*
50-
* Counting starts from 1 for line numbers in ignore files,
51-
* and from -1 decrementing for patterns from CLI args.
52-
*/
53-
int srcpos;
54-
} **excludes;
56+
struct exclude **excludes;
5557
};
5658

5759
/*

0 commit comments

Comments
 (0)