|
|
@ -146,6 +146,7 @@ public class CloneCommandTest extends RepositoryTestCase { |
|
|
|
command.setGitDir(new File(directory, ".git")); |
|
|
|
command.setGitDir(new File(directory, ".git")); |
|
|
|
command.setURI(fileUri()); |
|
|
|
command.setURI(fileUri()); |
|
|
|
Git git2 = command.call(); |
|
|
|
Git git2 = command.call(); |
|
|
|
|
|
|
|
addRepoToClose(git2.getRepository()); |
|
|
|
assertEquals(directory, git2.getRepository().getWorkTree()); |
|
|
|
assertEquals(directory, git2.getRepository().getWorkTree()); |
|
|
|
assertEquals(new File(directory, ".git"), git2.getRepository() |
|
|
|
assertEquals(new File(directory, ".git"), git2.getRepository() |
|
|
|
.getDirectory()); |
|
|
|
.getDirectory()); |
|
|
@ -161,6 +162,7 @@ public class CloneCommandTest extends RepositoryTestCase { |
|
|
|
command.setGitDir(gDir); |
|
|
|
command.setGitDir(gDir); |
|
|
|
command.setURI(fileUri()); |
|
|
|
command.setURI(fileUri()); |
|
|
|
Git git2 = command.call(); |
|
|
|
Git git2 = command.call(); |
|
|
|
|
|
|
|
addRepoToClose(git2.getRepository()); |
|
|
|
assertEquals(directory, git2.getRepository().getWorkTree()); |
|
|
|
assertEquals(directory, git2.getRepository().getWorkTree()); |
|
|
|
assertEquals(gDir, git2.getRepository() |
|
|
|
assertEquals(gDir, git2.getRepository() |
|
|
|
.getDirectory()); |
|
|
|
.getDirectory()); |
|
|
@ -177,6 +179,7 @@ public class CloneCommandTest extends RepositoryTestCase { |
|
|
|
command.setGitDir(gDir); |
|
|
|
command.setGitDir(gDir); |
|
|
|
command.setURI(fileUri()); |
|
|
|
command.setURI(fileUri()); |
|
|
|
Git git2 = command.call(); |
|
|
|
Git git2 = command.call(); |
|
|
|
|
|
|
|
addRepoToClose(git2.getRepository()); |
|
|
|
try { |
|
|
|
try { |
|
|
|
assertNull(null, git2.getRepository().getWorkTree()); |
|
|
|
assertNull(null, git2.getRepository().getWorkTree()); |
|
|
|
fail("Expected NoWorkTreeException"); |
|
|
|
fail("Expected NoWorkTreeException"); |
|
|
|