summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-09-03 18:04:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-09-05 21:05:12 (GMT)
commit4ff89ee52cd3cf6e38a11bb94e43df1b53c56eec (patch)
treeb0db9808799b9d2f55e04df1a4c25ba5e461106c /dir.h
parentcaa3d5544474a6ef8e8d7db5c073c1564b76d8bb (diff)
downloadgit-4ff89ee52cd3cf6e38a11bb94e43df1b53c56eec.zip
git-4ff89ee52cd3cf6e38a11bb94e43df1b53c56eec.tar.gz
git-4ff89ee52cd3cf6e38a11bb94e43df1b53c56eec.tar.bz2
treewide: rename 'EXCL_FLAG_' to 'PATTERN_FLAG_'
The first consumer of pattern-matching filenames was the .gitignore feature. In that context, storing a list of patterns as a 'struct exclude_list' makes sense. However, the sparse-checkout feature then adopted these structures and methods, but with the opposite meaning: these patterns match the files that should be included! It would be clearer to rename this entire library as a "pattern matching" library, and the callers apply exclusion/inclusion logic accordingly based on their needs. This commit replaces 'EXCL_FLAG_' to 'PATTERN_FLAG_' in the names of the flags used on 'struct path_pattern'. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/dir.h b/dir.h
index 4114d6b..87eb106 100644
--- a/dir.h
+++ b/dir.h
@@ -11,10 +11,10 @@ struct dir_entry {
char name[FLEX_ARRAY]; /* more */
};
-#define EXC_FLAG_NODIR 1
-#define EXC_FLAG_ENDSWITH 4
-#define EXC_FLAG_MUSTBEDIR 8
-#define EXC_FLAG_NEGATIVE 16
+#define PATTERN_FLAG_NODIR 1
+#define PATTERN_FLAG_ENDSWITH 4
+#define PATTERN_FLAG_MUSTBEDIR 8
+#define PATTERN_FLAG_NEGATIVE 16
struct path_pattern {
/*
@@ -28,7 +28,7 @@ struct path_pattern {
int nowildcardlen;
const char *base;
int baselen;
- unsigned flags; /* EXC_FLAG_* */
+ unsigned flags; /* PATTERN_FLAG_* */
/*
* Counting starts from 1 for line numbers in ignore files,