diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-16 16:46:23 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-16 16:46:23 -0700 |
commit | 36a45b4fa4cff868632162d4e3d00e1579298910 (patch) | |
tree | be0324914b3490bd4bdcabcbee287622e5fcd665 /builtin | |
parent | 6c7471bcf1453d0452d4f1191edd5f0e44561a77 (diff) | |
parent | 8c5cea0095ee57c36fddfb9016810c230ce26557 (diff) | |
download | git-36a45b4fa4cff868632162d4e3d00e1579298910.tar.gz |
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')
-rw-r--r-- | builtin/merge.c | 9 |
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; |