• J
    merge: fix incorrect merge message for ambiguous tag/branch · 751c5974
    Jeff King 提交于
    If we have both a tag and a branch named "foo", then calling
    "git merge foo" will warn about the ambiguous ref, but merge
    the tag.
    
    When generating the commit message, though, we simply
    checked whether "refs/heads/foo" existed, and if it did,
    assumed it was a branch. This led to the statement "Merge
    branch 'foo'" in the commit message, which is quite wrong.
    
    Instead, we should use dwim_ref to find the actual ref used,
    and describe it appropriately.
    
    In addition to the test in t7608, we must also tweak the
    expected output of t4202, which was accidentally triggering
    this bug.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    751c5974
t4202-log.sh 6.5 KB