aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java
diff options
context:
space:
mode:
authorRobin Stocker <robin@nibor.org>2011-05-05 17:33:01 +0200
committerRobin Stocker <robin@nibor.org>2011-05-05 17:50:44 +0200
commit7546e3b4c5612e5f6ee564d0d01b17533e7e0b3b (patch)
tree8e7e81579316132cfab6364073685781143fc0cf /org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java
parenteb9dba2fde1b0581ecae1e509a981a6158285f39 (diff)
downloadjgit-7546e3b4c5612e5f6ee564d0d01b17533e7e0b3b.tar.gz
jgit-7546e3b4c5612e5f6ee564d0d01b17533e7e0b3b.zip
Fix "into" part of merge message for HEAD
Merging into a non-master branch would result in the following message: Merge branch 'a' into HEAD Now the merge message is correct: Merge branch 'a' into b Change-Id: I488f97190e4c1711c23a7a3cbd64f8b13a87bbac Signed-off-by: Robin Stocker <robin@nibor.org>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java
index 04cfa25197..4ccc0f9bed 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java
@@ -169,6 +169,15 @@ public class MergeMessageFormatterTest extends SampleDataRepositoryTestCase {
}
@Test
+ public void testIntoHeadOtherThanMaster() throws IOException {
+ Ref a = db.getRef("refs/heads/a");
+ Ref b = db.getRef("refs/heads/b");
+ SymbolicRef head = new SymbolicRef("HEAD", b);
+ String message = formatter.format(Arrays.asList(a), head);
+ assertEquals("Merge branch 'a' into b", message);
+ }
+
+ @Test
public void testIntoSymbolicRefHeadPointingToMaster() throws IOException {
Ref a = db.getRef("refs/heads/a");
Ref master = db.getRef("refs/heads/master");