Fix git unit tests on machines which are not using master as init branch (#1854)

This commit is contained in:
Sebastian Sdorra
2021-11-10 15:45:12 +01:00
committed by GitHub
parent 3792374d59
commit e255eafa29

View File

@@ -109,7 +109,11 @@ public class GitMirrorCommandTest extends AbstractGitCommandTestBase {
@Before
public void bendContextToNewRepository() throws IOException, GitAPIException {
clone = tempFolder.newFolder();
Git.init().setBare(true).setDirectory(clone).call();
Git.init()
.setInitialBranch("master")
.setBare(true)
.setDirectory(clone)
.call();
GitContext emptyContext = createMirrorContext(clone);
SimpleGitWorkingCopyFactory workingCopyFactory =