diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-09-30 13:19:31 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-30 13:19:32 +0900 |
commit | 9755f70fe6498a4eaae2b9c63e91caa0fd97cb5a (patch) | |
tree | 1acd63bdfc87bb065de6fef7a027474a9951a2fa /builtin/clean.c | |
parent | Merge branch 'jh/trace2-pretty-output' (diff) | |
parent | unpack-trees: rename 'is_excluded_from_list()' (diff) | |
download | tgif-9755f70fe6498a4eaae2b9c63e91caa0fd97cb5a.tar.xz |
Merge branch 'ds/include-exclude'
The internal code originally invented for ".gitignore" processing
got reshuffled and renamed to make it less tied to "excluding" and
stress more that it is about "matching", as it has been reused for
things like sparse checkout specification that want to check if a
path is "included".
* ds/include-exclude:
unpack-trees: rename 'is_excluded_from_list()'
treewide: rename 'exclude' methods to 'pattern'
treewide: rename 'EXCL_FLAG_' to 'PATTERN_FLAG_'
treewide: rename 'struct exclude_list' to 'struct pattern_list'
treewide: rename 'struct exclude' to 'struct path_pattern'
Diffstat (limited to 'builtin/clean.c')
-rw-r--r-- | builtin/clean.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/clean.c b/builtin/clean.c index d5579da716..851beb7f0d 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -648,7 +648,7 @@ static int filter_by_patterns_cmd(void) struct strbuf confirm = STRBUF_INIT; struct strbuf **ignore_list; struct string_list_item *item; - struct exclude_list *el; + struct pattern_list *pl; int changed = -1, i; for (;;) { @@ -671,7 +671,7 @@ static int filter_by_patterns_cmd(void) break; memset(&dir, 0, sizeof(dir)); - el = add_exclude_list(&dir, EXC_CMDL, "manual exclude"); + pl = add_pattern_list(&dir, EXC_CMDL, "manual exclude"); ignore_list = strbuf_split_max(&confirm, ' ', 0); for (i = 0; ignore_list[i]; i++) { @@ -679,7 +679,7 @@ static int filter_by_patterns_cmd(void) if (!ignore_list[i]->len) continue; - add_exclude(ignore_list[i]->buf, "", 0, el, -(i+1)); + add_pattern(ignore_list[i]->buf, "", 0, pl, -(i+1)); } changed = 0; @@ -901,7 +901,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix) struct pathspec pathspec; struct strbuf buf = STRBUF_INIT; struct string_list exclude_list = STRING_LIST_INIT_NODUP; - struct exclude_list *el; + struct pattern_list *pl; struct string_list_item *item; const char *qname; struct option options[] = { @@ -958,9 +958,9 @@ int cmd_clean(int argc, const char **argv, const char *prefix) if (!ignored) setup_standard_excludes(&dir); - el = add_exclude_list(&dir, EXC_CMDL, "--exclude option"); + pl = add_pattern_list(&dir, EXC_CMDL, "--exclude option"); for (i = 0; i < exclude_list.nr; i++) - add_exclude(exclude_list.items[i].string, "", 0, el, -(i+1)); + add_pattern(exclude_list.items[i].string, "", 0, pl, -(i+1)); parse_pathspec(&pathspec, 0, PATHSPEC_PREFER_CWD, |