diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/clean.c | 3 | ||||
-rw-r--r-- | builtin/ls-files.c | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/builtin/clean.c b/builtin/clean.c index 0c7b3d0f4c..dd8973700a 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -97,9 +97,10 @@ int cmd_clean(int argc, const char **argv, const char *prefix) if (!ignored) setup_standard_excludes(&dir); + add_exclude_list(&dir, EXC_CMDL); for (i = 0; i < exclude_list.nr; i++) add_exclude(exclude_list.items[i].string, "", 0, - &dir.exclude_list[EXC_CMDL]); + &dir.exclude_list_group[EXC_CMDL].el[0]); pathspec = get_pathspec(prefix, argv); diff --git a/builtin/ls-files.c b/builtin/ls-files.c index ef7f99a9ed..0ca9d8e787 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -420,10 +420,10 @@ static int option_parse_z(const struct option *opt, static int option_parse_exclude(const struct option *opt, const char *arg, int unset) { - struct exclude_list *list = opt->value; + struct exclude_list_group *group = opt->value; exc_given = 1; - add_exclude(arg, "", 0, list); + add_exclude(arg, "", 0, &group->el[0]); return 0; } @@ -488,7 +488,8 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) "show unmerged files in the output"), OPT_BOOLEAN(0, "resolve-undo", &show_resolve_undo, "show resolve-undo information"), - { OPTION_CALLBACK, 'x', "exclude", &dir.exclude_list[EXC_CMDL], "pattern", + { OPTION_CALLBACK, 'x', "exclude", + &dir.exclude_list_group[EXC_CMDL], "pattern", "skip files matching pattern", 0, option_parse_exclude }, { OPTION_CALLBACK, 'X', "exclude-from", &dir, "file", @@ -523,6 +524,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) if (read_cache() < 0) die("index file corrupt"); + add_exclude_list(&dir, EXC_CMDL); argc = parse_options(argc, argv, prefix, builtin_ls_files_options, ls_files_usage, 0); if (show_tag || show_valid_bit) { |