stash: convert branch to builtin
[gitweb.git] / builtin / clean.c
index 0ccd95e693ed4f8453c7db4031bbd2d3a1a4dfae..bbcdeb2d9e7f275309609a2a21a5dd4baf1cf1bd 100644 (file)
@@ -16,6 +16,7 @@
 #include "column.h"
 #include "color.h"
 #include "pathspec.h"
+#include "help.h"
 
 static int force = -1; /* unset */
 static int interactive;
@@ -91,6 +92,8 @@ struct menu_stuff {
        void *stuff;
 };
 
+define_list_config_array(color_interactive_slots);
+
 static int git_clean_config(const char *var, const char *value, void *cb)
 {
        const char *slot_name;
@@ -137,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;
 }
@@ -973,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;