1
0
mirror of https://github.com/git/git.git synced 2024-10-20 01:48:55 +02:00
git/builtin
Junio C Hamano b5c9f1c1b0 merge: do not create a signed tag merge under --ff-only option
Starting at release v1.7.9, if you ask to merge a signed tag, "git merge"
always creates a merge commit, even when the tag points at a commit that
happens to be a descendant of your current commit.

Unfortunately, this interacts rather badly for people who use --ff-only to
make sure that their branch is free of local developments. It used to be
possible to say:

	$ git checkout -b frotz v1.7.9~30
        $ git merge --ff-only v1.7.9

and expect that the resulting tip of frotz branch matches v1.7.9^0 (aka
the commit tagged as v1.7.9), but this fails with the updated Git with:

	fatal: Not possible to fast-forward, aborting.

because a merge that merges v1.7.9 tag to v1.7.9~30 cannot be created by
fast forwarding.

We could teach users that now they have to do

	$ git merge --ff-only v1.7.9^0

but it is far more pleasant for users if we DWIMmed this ourselves.

When an integrator pulls in a topic from a lieutenant via a signed tag,
even when the work done by the lieutenant happens to fast-forward, the
integrator wants to have a merge record, so the integrator will not be
asking for --ff-only when running "git pull" in such a case. Therefore,
this change should not regress the support for the use case v1.7.9 wanted
to add.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-05 16:30:26 -08:00
..
add.c
annotate.c
apply.c Merge branch 'bc/maint-apply-check-no-patch' into maint 2011-12-21 11:42:45 -08:00
archive.c
bisect--helper.c
blame.c
branch.c Merge branch 'jn/branch-move-to-self' into maint 2011-12-28 11:32:33 -08:00
bundle.c
cat-file.c
check-attr.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'jc/checkout-m-twoway' into maint 2011-12-28 11:44:54 -08:00
clean.c
clone.c clone: the -o option has nothing to do with <branch> 2011-12-21 11:26:30 -08:00
commit-tree.c Merge branch 'jc/show-sig' 2012-01-06 12:44:07 -08:00
commit.c Merge branch 'jc/show-sig' 2012-01-06 12:44:07 -08:00
config.c Merge branch 'jv/maint-config-set' into maint 2011-12-28 12:03:19 -08:00
count-objects.c
describe.c
diff-files.c
diff-index.c
diff-tree.c
diff.c
fast-export.c
fetch-pack.c
fetch.c write first for-merge ref to FETCH_HEAD first 2012-01-03 16:13:14 -08:00
fmt-merge-msg.c
for-each-ref.c
fsck.c
gc.c
grep.c
hash-object.c
help.c
index-pack.c
init-db.c
log.c Sync with v1.7.8.1 2011-12-21 12:02:44 -08:00
ls-files.c
ls-remote.c
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c merge: do not create a signed tag merge under --ff-only option 2012-02-05 16:30:26 -08:00
mktag.c
mktree.c
mv.c Merge branch 'jk/maint-mv' into maint 2011-12-28 11:32:36 -08:00
name-rev.c
notes.c Merge branch 'nd/war-on-nul-in-commit' 2011-12-22 11:27:26 -08:00
pack-objects.c Merge branch 'maint' 2012-01-12 23:33:39 -08:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
push.c
read-tree.c
receive-pack.c Merge branch 'mh/ref-api-less-extra-refs' 2012-01-09 15:58:43 -08:00
reflog.c
remote-ext.c
remote-fd.c
remote.c
replace.c
rerere.c
reset.c
rev-list.c
rev-parse.c
revert.c Merge branch 'rr/revert-cherry-pick' 2011-12-22 15:30:22 -08:00
rm.c
send-pack.c
shortlog.c
show-branch.c
show-ref.c
stripspace.c
symbolic-ref.c
tag.c
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c
write-tree.c