aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeMessageFormatterTest.java
diff options
context:
space:
mode:
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");