aboutsummaryrefslogtreecommitdiff
path: root/builtin-merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-04 00:20:48 -0800
committerJunio C Hamano <gitster@pobox.com>2009-12-04 00:20:48 -0800
commitcb6020bb017405cc3e7f1faea6f30d4fd1b62e70 (patch)
treee03a7afb1884d2b4f8f1e45ee6a945baebd95806 /builtin-merge.c
parent1a56be134f9477296a7ade040e8b802bf3a643a1 (diff)
downloadgit-cb6020bb017405cc3e7f1faea6f30d4fd1b62e70.tar.gz
git-cb6020bb017405cc3e7f1faea6f30d4fd1b62e70.tar.xz
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-merge.c')
-rw-r--r--builtin-merge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-merge.c b/builtin-merge.c
index 56a1bb651..c3faa6b9c 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;