summaryrefslogtreecommitdiff
path: root/builtin/check-ignore.c
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:11 (GMT)
commitcaa3d5544474a6ef8e8d7db5c073c1564b76d8bb (patch)
tree76203b7747cbc9665cf97700947ed52ddd075e4d /builtin/check-ignore.c
parentab8db61390afd803ddd9778f84ba4c28dfa975c6 (diff)
downloadgit-caa3d5544474a6ef8e8d7db5c073c1564b76d8bb.zip
git-caa3d5544474a6ef8e8d7db5c073c1564b76d8bb.tar.gz
git-caa3d5544474a6ef8e8d7db5c073c1564b76d8bb.tar.bz2
treewide: rename 'struct exclude_list' to 'struct pattern_list'
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 renames 'struct exclude_list' to 'struct pattern_list' and renames several variables called 'el' to 'pl'. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/check-ignore.c')
-rw-r--r--builtin/check-ignore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index 9a0f234..97108cc 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -41,7 +41,7 @@ static void output_pattern(const char *path, struct path_pattern *pattern)
write_name_quoted(path, stdout, '\n');
} else {
if (pattern) {
- quote_c_style(pattern->el->src, NULL, stdout, 0);
+ quote_c_style(pattern->pl->src, NULL, stdout, 0);
printf(":%d:%s%s%s\t",
pattern->srcpos,
bang, pattern->pattern, slash);
@@ -58,7 +58,7 @@ static void output_pattern(const char *path, struct path_pattern *pattern)
} else {
if (pattern)
printf("%s%c%d%c%s%s%s%c%s%c",
- pattern->el->src, '\0',
+ pattern->pl->src, '\0',
pattern->srcpos, '\0',
bang, pattern->pattern, slash, '\0',
path, '\0');