summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-05-16 16:46:23 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-05-16 16:46:23 -0700
commit36a45b4fa4cff868632162d4e3d00e1579298910 (patch)
treebe0324914b3490bd4bdcabcbee287622e5fcd665 /builtin/merge.c
parentMerge branch 'maint' (diff)
parenttests: check git does not barf on merge.ff values for future versions of git (diff)
downloadtgif-36a45b4fa4cff868632162d4e3d00e1579298910.tar.xz
Merge branch 'mg/merge-ff-config'
* mg/merge-ff-config: tests: check git does not barf on merge.ff values for future versions of git merge: introduce merge.ff configuration variable Conflicts: t/t7600-merge.sh
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 9661c8f425..7eebb71491 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;