summaryrefslogtreecommitdiff
path: root/builtin-revert.c
diff options
context:
space:
mode:
authorAbhijit Menon-Sen <ams@toroid.org>2008-08-10 17:18:55 +0530
committerJunio C Hamano <gitster@pobox.com>2008-08-11 16:42:49 -0700
commitaa1a0111cc0e2a12c21ed05c88d8e9872fc166b2 (patch)
tree2d16c9378afe871dffedcf115c03d69b529d493b /builtin-revert.c
parentac39efbdf3d41443c40166b7578b7fb87c2f3b60 (diff)
downloadgit-aa1a0111cc0e2a12c21ed05c88d8e9872fc166b2.tar.gz
Make cherry-pick use rerere for conflict resolution.
Cherry-picking can be helped by reusing previous confliction resolution by invoking rerere automatically. Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-revert.c')
-rw-r--r--builtin-revert.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-revert.c b/builtin-revert.c
index 27881e9493..36677053f8 100644
--- a/builtin-revert.c
+++ b/builtin-revert.c
@@ -11,6 +11,7 @@
#include "cache-tree.h"
#include "diff.h"
#include "revision.h"
+#include "rerere.h"
/*
* This implements the builtins revert and cherry-pick.
@@ -395,6 +396,7 @@ static int revert_or_cherry_pick(int argc, const char **argv)
die ("Error wrapping up %s", defmsg);
fprintf(stderr, "Automatic %s failed.%s\n",
me, help_msg(commit->object.sha1));
+ rerere();
exit(1);
}
if (commit_lock_file(&msg_file) < 0)