summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2023-04-27 01:00:44 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2023-04-27 01:00:58 +0200
commit2aaa5611366edb9f48ebaa15860dce03bcfe4c93 (patch)
tree3bbb237d2f57c809b99511606eb0c2e96c547cff
parent61d4e31349719778bce67fc9ec707cbb0a98def6 (diff)
downloadjgit-2aaa5611366edb9f48ebaa15860dce03bcfe4c93.tar.gz
jgit-2aaa5611366edb9f48ebaa15860dce03bcfe4c93.zip
Fix CommitTemplateConfigTest
The cherry-picked 61d4e313 doesn't match 5.13 APIs which changed in newer versions. Change-Id: I61ed0242472ed822028d86d3038f956f6bd5735c
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java
index 6dbe30af2d..eaebd57e43 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/CommitTemplateConfigTest.java
@@ -17,7 +17,6 @@ import java.io.IOException;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.junit.JGitTestUtil;
-import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -37,8 +36,6 @@ public class CommitTemplateConfigTest {
throws ConfigInvalidException, IOException {
Config config = new Config(null);
File tempFile = tmp.newFile("testCommitTemplate-");
- File workTree = tmp.newFolder("dummy-worktree");
- Repository repo = FileRepositoryBuilder.create(workTree);
String templateContent = "content of the template";
JGitTestUtil.write(tempFile, templateContent);
// proper evaluation of the ~/ directory
@@ -55,6 +52,6 @@ public class CommitTemplateConfigTest {
.getCommitTemplatePath();
assertEquals(expectedTemplatePath, templatePath);
assertEquals(templateContent,
- config.get(CommitConfig.KEY).getCommitTemplateContent(repo));
+ config.get(CommitConfig.KEY).getCommitTemplateContent());
}
}