]> source.dussan.org Git - jgit.git/commit
Don't print "into HEAD" when merging refs/heads/master 96/2396/1
authorRobin Stocker <robin@nibor.org>
Tue, 1 Feb 2011 21:27:33 +0000 (22:27 +0100)
committerRobin Stocker <robin@nibor.org>
Tue, 1 Feb 2011 21:27:33 +0000 (22:27 +0100)
commitb0245b548b9c9fe1801fb8af727b08a7c3cc9706
tree04ce836acaff18892aed1e9b625d05f04622ba36
parent13bcf05a9ea2d4943faef2c879aac65d37517eb6
Don't print "into HEAD" when merging refs/heads/master

When MergeMessageFormatter was given a symbolic ref HEAD which points to
refs/heads/master (which is the case when merging a branch in EGit), it
would result in a merge message like the following:

  Merge branch 'a' into HEAD

But it should print the following (as C Git does):

  Merge branch 'a'

The solution is to use the leaf ref when checking for refs/heads/master.

Change-Id: I28ae5713b7e8123a0176fc6d7356e469900e7e97
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeMessageFormatter.java