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 <pclouds@gmail.com> Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Jul 14, 2014 at 11:48 UTC 709359c85cf366df68a1cabf9d68978c05c541c5
1 file changed +22 -20
dir.h
+22 -20
@@ -15,6 +15,27 @@ struct dir_entry {
15 #define EXC_FLAG_MUSTBEDIR 8
16 #define EXC_FLAG_NEGATIVE 16
17
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 +
39 /*
40 * Each excludes file will be parsed into a fresh exclude_list which
41 * is appended to the relevant exclude_list_group (either EXC_DIRS or
@@ -32,26 +53,7 @@ struct exclude_list {
53 /* origin of list, e.g. path to filename, or descriptive string */
54 const char *src;
55
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;
57 };
58
59 /*