|
|
@ -145,7 +145,6 @@ public class SubmoduleWalkTest extends RepositoryTestCase { |
|
|
|
assertFalse(gen.next()); |
|
|
|
assertFalse(gen.next()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("resource" /* java 7 */) |
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void repositoryWithRootLevelSubmoduleAbsoluteRef() |
|
|
|
public void repositoryWithRootLevelSubmoduleAbsoluteRef() |
|
|
|
throws IOException, ConfigInvalidException { |
|
|
|
throws IOException, ConfigInvalidException { |
|
|
@ -189,17 +188,16 @@ public class SubmoduleWalkTest extends RepositoryTestCase { |
|
|
|
assertNull(gen.getModulesPath()); |
|
|
|
assertNull(gen.getModulesPath()); |
|
|
|
assertNull(gen.getModulesUpdate()); |
|
|
|
assertNull(gen.getModulesUpdate()); |
|
|
|
assertNull(gen.getModulesUrl()); |
|
|
|
assertNull(gen.getModulesUrl()); |
|
|
|
Repository subRepo = gen.getRepository(); |
|
|
|
try (Repository subRepo = gen.getRepository()) { |
|
|
|
assertNotNull(subRepo); |
|
|
|
assertNotNull(subRepo); |
|
|
|
assertEquals(modulesGitDir.getAbsolutePath(), |
|
|
|
assertEquals(modulesGitDir.getAbsolutePath(), |
|
|
|
subRepo.getDirectory().getAbsolutePath()); |
|
|
|
subRepo.getDirectory().getAbsolutePath()); |
|
|
|
assertEquals(new File(db.getWorkTree(), path).getAbsolutePath(), |
|
|
|
assertEquals(new File(db.getWorkTree(), path).getAbsolutePath(), |
|
|
|
subRepo.getWorkTree().getAbsolutePath()); |
|
|
|
subRepo.getWorkTree().getAbsolutePath()); |
|
|
|
subRepo.close(); |
|
|
|
} |
|
|
|
assertFalse(gen.next()); |
|
|
|
assertFalse(gen.next()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("resource" /* java 7 */) |
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void repositoryWithRootLevelSubmoduleRelativeRef() |
|
|
|
public void repositoryWithRootLevelSubmoduleRelativeRef() |
|
|
|
throws IOException, ConfigInvalidException { |
|
|
|
throws IOException, ConfigInvalidException { |
|
|
@ -244,13 +242,14 @@ public class SubmoduleWalkTest extends RepositoryTestCase { |
|
|
|
assertNull(gen.getModulesPath()); |
|
|
|
assertNull(gen.getModulesPath()); |
|
|
|
assertNull(gen.getModulesUpdate()); |
|
|
|
assertNull(gen.getModulesUpdate()); |
|
|
|
assertNull(gen.getModulesUrl()); |
|
|
|
assertNull(gen.getModulesUrl()); |
|
|
|
Repository subRepo = gen.getRepository(); |
|
|
|
try (Repository subRepo = gen.getRepository()) { |
|
|
|
assertNotNull(subRepo); |
|
|
|
assertNotNull(subRepo); |
|
|
|
assertEqualsFile(modulesGitDir, subRepo.getDirectory()); |
|
|
|
assertEqualsFile(modulesGitDir, subRepo.getDirectory()); |
|
|
|
assertEqualsFile(new File(db.getWorkTree(), path), |
|
|
|
assertEqualsFile(new File(db.getWorkTree(), path), |
|
|
|
subRepo.getWorkTree()); |
|
|
|
subRepo.getWorkTree()); |
|
|
|
subRepo.close(); |
|
|
|
subRepo.close(); |
|
|
|
assertFalse(gen.next()); |
|
|
|
assertFalse(gen.next()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|