From cb6020bb017405cc3e7f1faea6f30d4fd1b62e70 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 4 Dec 2009 00:20:48 -0800 Subject: 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 --- builtin-merge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builtin-merge.c') diff --git a/builtin-merge.c b/builtin-merge.c index 56a1bb651f..c3faa6b9c3 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -52,6 +52,7 @@ static struct strategy **use_strategies; static size_t use_strategies_nr, use_strategies_alloc; static const char *branch; static int verbosity; +static int allow_rerere_auto; static struct strategy all_strategy[] = { { "recursive", DEFAULT_TWOHEAD | NO_TRIVIAL }, @@ -170,6 +171,7 @@ static struct option builtin_merge_options[] = { "allow fast-forward (default)"), OPT_BOOLEAN(0, "ff-only", &fast_forward_only, "abort if fast-forward is not possible"), + OPT_RERERE_AUTOUPDATE(&allow_rerere_auto), OPT_CALLBACK('s', "strategy", &use_strategies, "strategy", "merge strategy to use", option_parse_strategy), OPT_CALLBACK('m', "message", &merge_msg, "message", @@ -790,7 +792,7 @@ static int suggest_conflicts(void) } } fclose(fp); - rerere(); + rerere(allow_rerere_auto); printf("Automatic merge failed; " "fix conflicts and then commit the result.\n"); return 1; -- cgit v1.2.3