|
|
@ -601,17 +601,17 @@ public class CloneCommandTest extends RepositoryTestCase { |
|
|
|
|
|
|
|
|
|
|
|
SubmoduleWalk walk = SubmoduleWalk.forIndex(git2.getRepository()); |
|
|
|
SubmoduleWalk walk = SubmoduleWalk.forIndex(git2.getRepository()); |
|
|
|
assertTrue(walk.next()); |
|
|
|
assertTrue(walk.next()); |
|
|
|
Repository clonedSub1 = walk.getRepository(); |
|
|
|
try (Repository clonedSub1 = walk.getRepository()) { |
|
|
|
assertNotNull(clonedSub1); |
|
|
|
assertNotNull(clonedSub1); |
|
|
|
|
|
|
|
assertEquals(new File(git2.getRepository().getWorkTree(), |
|
|
|
|
|
|
|
walk.getPath()), clonedSub1.getWorkTree()); |
|
|
|
assertEquals( |
|
|
|
assertEquals( |
|
|
|
new File(git2.getRepository().getWorkTree(), walk.getPath()), |
|
|
|
new File(new File(git2.getRepository().getDirectory(), |
|
|
|
clonedSub1.getWorkTree()); |
|
|
|
|
|
|
|
assertEquals(new File(new File(git2.getRepository().getDirectory(), |
|
|
|
|
|
|
|
"modules"), walk.getPath()), |
|
|
|
"modules"), walk.getPath()), |
|
|
|
clonedSub1.getDirectory()); |
|
|
|
clonedSub1.getDirectory()); |
|
|
|
status = new SubmoduleStatusCommand(clonedSub1); |
|
|
|
status = new SubmoduleStatusCommand(clonedSub1); |
|
|
|
statuses = status.call(); |
|
|
|
statuses = status.call(); |
|
|
|
clonedSub1.close(); |
|
|
|
} |
|
|
|
pathStatus = statuses.get(path); |
|
|
|
pathStatus = statuses.get(path); |
|
|
|
assertNotNull(pathStatus); |
|
|
|
assertNotNull(pathStatus); |
|
|
|
assertEquals(SubmoduleStatusType.INITIALIZED, pathStatus.getType()); |
|
|
|
assertEquals(SubmoduleStatusType.INITIALIZED, pathStatus.getType()); |
|
|
|