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>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2014-07-14 11:48:03 +02:00
committed by Junio C Hamano
parent d961baa846
commit 709359c85c

40
dir.h
View File

@ -15,24 +15,7 @@ struct dir_entry {
#define EXC_FLAG_MUSTBEDIR 8 #define EXC_FLAG_MUSTBEDIR 8
#define EXC_FLAG_NEGATIVE 16 #define EXC_FLAG_NEGATIVE 16
/* struct exclude {
* Each excludes file will be parsed into a fresh exclude_list which
* is appended to the relevant exclude_list_group (either EXC_DIRS or
* EXC_FILE). An exclude_list within the EXC_CMDL exclude_list_group
* can also be used to represent the list of --exclude values passed
* via CLI args.
*/
struct exclude_list {
int nr;
int alloc;
/* remember pointer to exclude file contents so we can free() */
char *filebuf;
/* origin of list, e.g. path to filename, or descriptive string */
const char *src;
struct exclude {
/* /*
* This allows callers of last_exclude_matching() etc. * This allows callers of last_exclude_matching() etc.
* to determine the origin of the matching pattern. * to determine the origin of the matching pattern.
@ -51,7 +34,26 @@ struct exclude_list {
* and from -1 decrementing for patterns from CLI args. * and from -1 decrementing for patterns from CLI args.
*/ */
int srcpos; int srcpos;
} **excludes; };
/*
* Each excludes file will be parsed into a fresh exclude_list which
* is appended to the relevant exclude_list_group (either EXC_DIRS or
* EXC_FILE). An exclude_list within the EXC_CMDL exclude_list_group
* can also be used to represent the list of --exclude values passed
* via CLI args.
*/
struct exclude_list {
int nr;
int alloc;
/* remember pointer to exclude file contents so we can free() */
char *filebuf;
/* origin of list, e.g. path to filename, or descriptive string */
const char *src;
struct exclude **excludes;
}; };
/* /*