Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
fix portability issues with $ in double quotes
[gitweb.git]
/
builtin-clean.c
diff --git
a/builtin-clean.c
b/builtin-clean.c
index 28cdcd0274dd5891c7ad3dc3804cb0acead883f2..3a70fa81bdd8f0e087476560f7c2f668a3cda0ea 100644
(file)
--- a/
builtin-clean.c
+++ b/
builtin-clean.c
@@
-75,11
+75,13
@@
int cmd_clean(int argc, const char **argv, const char *prefix)
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);