From f23e8decd544c8f81b40c98211f6cb028fa70cdc Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 6 May 2011 12:27:05 -0700 Subject: merge: introduce merge.ff configuration variable This variable gives the default setting for --ff, --no-ff or --ff-only options of "git merge" command. Signed-off-by: Junio C Hamano --- builtin/merge.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'builtin') diff --git a/builtin/merge.c b/builtin/merge.c index 0f03dff116..65c79630f0 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -550,6 +550,15 @@ static int git_merge_config(const char *k, const char *v, void *cb) if (is_bool && shortlog_len) shortlog_len = DEFAULT_MERGE_LOG_LEN; return 0; + } else if (!strcmp(k, "merge.ff")) { + int boolval = git_config_maybe_bool(k, v); + if (0 <= boolval) { + allow_fast_forward = boolval; + } else if (v && !strcmp(v, "only")) { + allow_fast_forward = 1; + fast_forward_only = 1; + } /* do not barf on values from future versions of git */ + return 0; } else if (!strcmp(k, "merge.defaulttoupstream")) { default_to_upstream = git_config_bool(k, v); return 0; -- cgit v1.2.3