Merged in feature/init_new_repo (pull request #394)

Feature/init new repo
This commit is contained in:
Sebastian Sdorra
2020-01-21 07:13:01 +00:00
19 changed files with 615 additions and 39 deletions

View File

@@ -70,6 +70,18 @@ public class SimpleGitWorkdirFactoryTest extends AbstractGitCommandTestBase {
}
}
@Test
public void shouldCheckoutDefaultBranch() {
SimpleGitWorkdirFactory factory = new SimpleGitWorkdirFactory(workdirProvider);
try (WorkingCopy<Repository, Repository> workingCopy = factory.createWorkingCopy(createContext(), null)) {
assertThat(new File(workingCopy.getWorkingRepository().getWorkTree(), "a.txt"))
.exists()
.isFile()
.hasContent("a\nline for blame");
}
}
@Test
public void cloneFromPoolShouldNotBeReused() {
SimpleGitWorkdirFactory factory = new SimpleGitWorkdirFactory(workdirProvider);