From 20bdcf9ea82c390ee70180c3edb51888e7d237bc Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 5 Jan 2022 18:21:33 +0100 Subject: Introduce a constant for the length of an abbreviated hash string Signed-off-by: Sebastian Schuberth Change-Id: I196d58a813f7caa1965af4cf8e2f977ed4cdc350 --- .../tst/org/eclipse/jgit/api/RevertCommandTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'org.eclipse.jgit.test') 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 history = git.log().call().iterator(); RevCommit revertCommit = history.next(); -- cgit v1.2.3