diff options
Diffstat (limited to 'builtin-clean.c')
-rw-r--r-- | builtin-clean.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-clean.c b/builtin-clean.c index 2d8c735d48..e424b77e6b 100644 --- a/builtin-clean.c +++ b/builtin-clean.c @@ -71,11 +71,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); |