diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-12-04 00:20:48 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-12-04 00:20:48 -0800 |
commit | cb6020bb017405cc3e7f1faea6f30d4fd1b62e70 (patch) | |
tree | e03a7afb1884d2b4f8f1e45ee6a945baebd95806 /builtin-revert.c | |
parent | 1a56be134f9477296a7ade040e8b802bf3a643a1 (diff) | |
download | git-cb6020bb017405cc3e7f1faea6f30d4fd1b62e70.tar.gz |
Teach --[no-]rerere-autoupdate option to merge, revert and friends
Introduce a command line option to override rerere.autoupdate configuration
variable to make it more useful.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-revert.c')
-rw-r--r-- | builtin-revert.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-revert.c b/builtin-revert.c index 151aa6a981..857ca2eefa 100644 --- a/builtin-revert.c +++ b/builtin-revert.c @@ -38,6 +38,7 @@ static const char * const cherry_pick_usage[] = { static int edit, no_replay, no_commit, mainline, signoff; static enum { REVERT, CHERRY_PICK } action; static struct commit *commit; +static int allow_rerere_auto; static const char *me; @@ -57,6 +58,7 @@ static void parse_args(int argc, const char **argv) OPT_BOOLEAN('r', NULL, &noop, "no-op (backward compatibility)"), OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"), OPT_INTEGER('m', "mainline", &mainline, "parent number"), + OPT_RERERE_AUTOUPDATE(&allow_rerere_auto), OPT_END(), }; @@ -395,7 +397,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(); + rerere(allow_rerere_auto); exit(1); } if (commit_lock_file(&msg_file) < 0) |