diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-07-14 11:48:03 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-14 15:24:34 -0700 |
commit | 709359c85cf366df68a1cabf9d68978c05c541c5 (patch) | |
tree | 83299565c0a75f0d5c2930e105321be97f26ef46 /dir.h | |
parent | d961baa84689afdd0fe6b81f68b06481d83ce249 (diff) | |
download | git-709359c85cf366df68a1cabf9d68978c05c541c5.tar.gz |
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>
Diffstat (limited to 'dir.h')
-rw-r--r-- | dir.h | 42 |
1 files changed, 22 insertions, 20 deletions
@@ -15,6 +15,27 @@ struct dir_entry { #define EXC_FLAG_MUSTBEDIR 8 #define EXC_FLAG_NEGATIVE 16 +struct exclude { + /* + * This allows callers of last_exclude_matching() etc. + * to determine the origin of the matching pattern. + */ + struct exclude_list *el; + + const char *pattern; + int patternlen; + int nowildcardlen; + const char *base; + int baselen; + int flags; + + /* + * Counting starts from 1 for line numbers in ignore files, + * and from -1 decrementing for patterns from CLI args. + */ + int srcpos; +}; + /* * Each excludes file will be parsed into a fresh exclude_list which * is appended to the relevant exclude_list_group (either EXC_DIRS or @@ -32,26 +53,7 @@ struct exclude_list { /* origin of list, e.g. path to filename, or descriptive string */ const char *src; - struct exclude { - /* - * This allows callers of last_exclude_matching() etc. - * to determine the origin of the matching pattern. - */ - struct exclude_list *el; - - const char *pattern; - int patternlen; - int nowildcardlen; - const char *base; - int baselen; - int flags; - - /* - * Counting starts from 1 for line numbers in ignore files, - * and from -1 decrementing for patterns from CLI args. - */ - int srcpos; - } **excludes; + struct exclude **excludes; }; /* |