diff options
author | Sebastian Schuberth <sebastian.schuberth@bosch.io> | 2022-01-05 18:21:33 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-02-03 00:21:25 +0100 |
commit | 20bdcf9ea82c390ee70180c3edb51888e7d237bc (patch) | |
tree | 686e5d55fbe4b13f165fd44a4dcd4f8f1ffcf601 /org.eclipse.jgit.test/tst/org/eclipse/jgit/api | |
parent | f7707e402aade0f96576b9ab648382af5ba56c4b (diff) | |
download | jgit-20bdcf9ea82c390ee70180c3edb51888e7d237bc.tar.gz jgit-20bdcf9ea82c390ee70180c3edb51888e7d237bc.zip |
Introduce a constant for the length of an abbreviated hash string
Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
Change-Id: I196d58a813f7caa1965af4cf8e2f977ed4cdc350
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java index d833f12d26..1c7b8d13a8 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java @@ -9,6 +9,7 @@ */ package org.eclipse.jgit.api; +import static org.eclipse.jgit.lib.Constants.OBJECT_ID_ABBREV_STRING_LENGTH; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; @@ -166,7 +167,9 @@ public class RevertCommandTest extends RepositoryTestCase { checkFile(new File(db.getWorkTree(), "a"), "first\n" + "<<<<<<< master\n" + "second\n" + "third\n" + "=======\n" - + ">>>>>>> " + secondCommit.getId().abbreviate(7).name() + + ">>>>>>> " + + secondCommit.getId() + .abbreviate(OBJECT_ID_ABBREV_STRING_LENGTH).name() + " add second\n"); Iterator<RevCommit> history = git.log().call().iterator(); RevCommit revertCommit = history.next(); |