diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-09-30 06:19:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-30 06:19:32 +0200 |
commit | 9755f70fe6498a4eaae2b9c63e91caa0fd97cb5a (patch) | |
tree | 1acd63bdfc87bb065de6fef7a027474a9951a2fa /builtin/ls-files.c | |
parent | Merge branch 'jh/trace2-pretty-output' (diff) | |
parent | unpack-trees: rename 'is_excluded_from_list()' (diff) | |
download | git-9755f70fe6498a4eaae2b9c63e91caa0fd97cb5a.tar.xz git-9755f70fe6498a4eaae2b9c63e91caa0fd97cb5a.zip |
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/ls-files.c')
-rw-r--r-- | builtin/ls-files.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 670e8fb93c..f069a028ce 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -492,7 +492,7 @@ static int option_parse_exclude_from(const struct option *opt, BUG_ON_OPT_NEG(unset); exc_given = 1; - add_excludes_from_file(dir, arg); + add_patterns_from_file(dir, arg); return 0; } @@ -516,7 +516,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) int require_work_tree = 0, show_tag = 0, i; const char *max_prefix; struct dir_struct dir; - struct exclude_list *el; + struct pattern_list *pl; struct string_list exclude_list = STRING_LIST_INIT_NODUP; struct option builtin_ls_files_options[] = { /* Think twice before adding "--nul" synonym to this */ @@ -594,9 +594,9 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) argc = parse_options(argc, argv, prefix, builtin_ls_files_options, ls_files_usage, 0); - 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, --exclude_args); + add_pattern(exclude_list.items[i].string, "", 0, pl, --exclude_args); } if (show_tag || show_valid_bit || show_fsmonitor_bit) { tag_cached = "H "; |