summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-14 18:18:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-16 19:22:43 (GMT)
commitadcc94a0aa7055be4133ebda8b25f4af63285c6d (patch)
tree1411bcf159e21cf3fa6d6551d9aaa132025cdf62 /Documentation
parentb2e45c695d09f6a31ce09347ae0a5d2cdfe9dd4e (diff)
downloadgit-adcc94a0aa7055be4133ebda8b25f4af63285c6d.zip
git-adcc94a0aa7055be4133ebda8b25f4af63285c6d.tar.gz
git-adcc94a0aa7055be4133ebda8b25f4af63285c6d.tar.bz2
merge: allow fast-forward when merging a tracked tag
Long time ago at fab47d05 ("merge: force edit and no-ff mode when merging a tag object", 2011-11-07), "git merge" was made to always create a merge commit when merging a tag, even when the side branch being merged is a descendant of the current branch. This default is good for merges made by upstream maintainers to integrate work signed by downstream contributors, but will leave pointless no-ff merges when downstream contributors pull a newer release tag to make their long-running topic branches catch up with the upstream. When there is no local work left on the topic, such a merge should simply fast-forward to the commit pointed at by the release tag. Update the default (again) for "git merge" that merges a tag object to (1) --no-ff (i.e. create a merge commit even when side branch fast forwards) if the tag being merged is not at its expected place in refs/tags/ hierarchy and (2) --ff (i.e. allow fast-forward update when able) otherwise. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/merge-options.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
index 3888c3f..63a3fc0 100644
--- a/Documentation/merge-options.txt
+++ b/Documentation/merge-options.txt
@@ -35,7 +35,8 @@ set to `no` at the beginning of them.
--no-ff::
Create a merge commit even when the merge resolves as a
fast-forward. This is the default behaviour when merging an
- annotated (and possibly signed) tag.
+ annotated (and possibly signed) tag that is not stored in
+ its natural place in 'refs/tags/' hierarchy.
--ff-only::
Refuse to merge and exit with a non-zero status unless the