diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2023-04-27 01:00:44 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2023-04-27 01:00:58 +0200 |
commit | 2aaa5611366edb9f48ebaa15860dce03bcfe4c93 (patch) | |
tree | 3bbb237d2f57c809b99511606eb0c2e96c547cff | |
parent | 61d4e31349719778bce67fc9ec707cbb0a98def6 (diff) | |
download | jgit-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.java | 5 |
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()); } } |