diff --git a/builtin-clean.c b/builtin-clean.c
index 28cdcd0274dd5891c7ad3dc3804cb0acead883f2..fac64e6cd3717dfffb0f54124de9545f7cdc391a 100644 (file)
--- a/builtin-clean.c
+++ b/builtin-clean.c
die("-x and -X cannot be used together");
if (!show_only && !force)
- die("clean.requireForce%s set and -n or -f not given; "
- "refusing to clean", config_set ? "" : " not");
+ die("clean.requireForce %s to true and neither -n nor -f given; "
+ "refusing to clean", config_set ? "set" : "defaults");
if (force > 1)
rm_flags = 0;
dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
+ if (read_cache() < 0)
+ die("index file corrupt");
+
if (!ignored)
setup_standard_excludes(&dir);
pathspec = get_pathspec(prefix, argv);
- read_cache();
fill_directory(&dir, pathspec);