From 6ed07f5cb5f5c296c8abca8ac06a6f923b96119c Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Thu, 12 Mar 2015 12:01:44 -0700 Subject: TestRepository: Ignore existing Change-Id in message Change-Id: I343c3065fa369ef8aab2b033ac1e392b28d10daf --- .../tst/org/eclipse/jgit/junit/TestRepositoryTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'org.eclipse.jgit.test/tst/org') diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/junit/TestRepositoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/junit/TestRepositoryTest.java index 87ce011763..09259de7db 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/junit/TestRepositoryTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/junit/TestRepositoryTest.java @@ -102,6 +102,16 @@ public class TestRepositoryTest { c2.getFullMessage()); } + @Test + public void insertChangeIdIgnoresExisting() throws Exception { + String msg = "message\n" + + "\n" + + "Change-Id: Ideadbeefdeadbeefdeadbeefdeadbeefdeadbeef\n"; + RevCommit c = tr.commit().message(msg).insertChangeId().create(); + rw.parseBody(c); + assertEquals(msg, c.getFullMessage()); + } + @Test public void resetFromSymref() throws Exception { repo.updateRef("HEAD").link("refs/heads/master"); -- cgit v1.2.3