#include "builtin.h"
#include "cache.h"
+#include "config.h"
#include "dir.h"
#include "parse-options.h"
#include "string-list.h"
for_each_string_list_item(item, &del_list) {
int dtype = DT_UNKNOWN;
- if (is_excluded(&dir, item->string, &dtype)) {
+ if (is_excluded(&dir, &the_index, item->string, &dtype)) {
*item->string = '\0';
changed++;
}
int ret;
ret = menus[*chosen].fn();
if (ret != MENU_RETURN_NO_LOOP) {
- free(chosen);
- chosen = NULL;
+ FREE_AND_NULL(chosen);
if (!del_list.nr) {
clean_print_color(CLEAN_COLOR_ERROR);
printf_ln(_("No more files to clean, exiting."));
quit_cmd();
}
- free(chosen);
- chosen = NULL;
+ FREE_AND_NULL(chosen);
break;
}
}
PATHSPEC_PREFER_CWD,
prefix, argv);
- fill_directory(&dir, &pathspec);
+ fill_directory(&dir, &the_index, &pathspec);
correct_untracked_entries(&dir);
for (i = 0; i < dir.nr; i++) {