Code

merge: do not mistake (ancestor of) tag for branch
authorJonathan Nieder <jrnieder@gmail.com>
Tue, 17 Aug 2010 06:52:48 +0000 (01:52 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Aug 2010 21:02:02 +0000 (14:02 -0700)
commitb81f925f709a10b37fb4fcd03629b55bc890a478
tree915874e3e43dc2615104b2fceca2ea5ecfffa1e5
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9
merge: do not mistake (ancestor of) tag for branch

If no branch 'foo' exists but a tag 'foo' does, then
git merge foo^ results in

Merge branch 'foo' (early part)

as a commit message, because the relevant code path checks that
refs/heads/foo is a valid refname for writing rather than for
reading.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c
t/t7600-merge.sh