summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-06-05 12:00:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-06-05 12:00:25 -0700
commit5c2e65497be246c6b61e772e79f54b346baf5f49 (patch)
tree4794aea09bee2e7a19aa2bfae240498db985e70e
parentMerge branch 'pt/pull-log-n' into maint (diff)
parentrerere: exit silently on "forget" when rerere is disabled (diff)
downloadtgif-5c2e65497be246c6b61e772e79f54b346baf5f49.tar.xz
Merge branch 'jk/rerere-forget-check-enabled' into maint
"git rerere forget" in a repository without rerere enabled gave a cryptic error message; it should be a silent no-op instead. * jk/rerere-forget-check-enabled: rerere: exit silently on "forget" when rerere is disabled
-rw-r--r--rerere.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rerere.c b/rerere.c
index 31644dec04..94aea9a36f 100644
--- 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);