Merge branch 'jk/rerere-forget-check-enabled' into maint
[gitweb.git] / rerere.c
index 31644dec04fe4a77d43624720ff516de2d746dbc..94aea9a36f16d9d72c1769aa9e258c5370c7dc84 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -659,6 +659,8 @@ int rerere_forget(struct pathspec *pathspec)
                return error("Could not read index");
 
        fd = setup_rerere(&merge_rr, RERERE_NOAUTOUPDATE);
+       if (fd < 0)
+               return 0;
 
        unmerge_cache(pathspec);
        find_conflict(&conflict);