X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-clean.c;h=3a70fa81bdd8f0e087476560f7c2f668a3cda0ea;hb=dcf783a26110ab99f2052e378ee76c3542a4b9e9;hp=28cdcd0274dd5891c7ad3dc3804cb0acead883f2;hpb=8426f672fc65239135b1f1580bb79ecb16fd05f0;p=git.git diff --git a/builtin-clean.c b/builtin-clean.c index 28cdcd027..3a70fa81b 100644 --- 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);