Merge branch 'master' of git://github.com/git-l10n/git-po
[gitweb.git] / builtin / clean.c
index ab402c204cbcaea6190608753311605d37ca83d2..bbcdeb2d9e7f275309609a2a21a5dd4baf1cf1bd 100644 (file)
@@ -140,6 +140,7 @@ static void clean_print_color(enum color_clean ix)
 static int exclude_cb(const struct option *opt, const char *arg, int unset)
 {
        struct string_list *exclude_list = opt->value;
+       BUG_ON_OPT_NEG(unset);
        string_list_append(exclude_list, arg);
        return 0;
 }
@@ -976,7 +977,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
                        continue;
 
                if (pathspec.nr)
-                       matches = dir_path_match(ent, &pathspec, 0, NULL);
+                       matches = dir_path_match(&the_index, ent, &pathspec, 0, NULL);
 
                if (pathspec.nr && !matches)
                        continue;