X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin%2Fclean.c;h=0c7b3d0f4c28c9e9c721c961e529196751271d11;hb=78c17b9943ade62e6eebe069fadaecc637b301df;hp=75697f711116e42df1e21e608c21829f49549b08;hpb=2177dc69cd693eeb52def931f41ad4f3a766846e;p=git.git diff --git a/builtin/clean.c b/builtin/clean.c index 75697f711..0c7b3d0f4 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -54,7 +54,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix) OPT_BOOLEAN('d', NULL, &remove_directories, "remove whole directories"), { OPTION_CALLBACK, 'e', "exclude", &exclude_list, "pattern", - "exclude ", PARSE_OPT_NONEG, exclude_cb }, + "add to ignore rules", PARSE_OPT_NONEG, exclude_cb }, OPT_BOOLEAN('x', NULL, &ignored, "remove ignored files, too"), OPT_BOOLEAN('X', NULL, &ignored_only, "remove only ignored files"), @@ -98,7 +98,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix) setup_standard_excludes(&dir); for (i = 0; i < exclude_list.nr; i++) - add_exclude(exclude_list.items[i].string, "", 0, dir.exclude_list); + add_exclude(exclude_list.items[i].string, "", 0, + &dir.exclude_list[EXC_CMDL]); pathspec = get_pathspec(prefix, argv);