|
|
@ -65,6 +65,7 @@ import org.eclipse.jgit.dircache.DirCacheEditor.PathEdit; |
|
|
|
import org.eclipse.jgit.dircache.DirCacheEntry; |
|
|
|
import org.eclipse.jgit.dircache.DirCacheEntry; |
|
|
|
import org.eclipse.jgit.errors.ConfigInvalidException; |
|
|
|
import org.eclipse.jgit.errors.ConfigInvalidException; |
|
|
|
import org.eclipse.jgit.errors.NoWorkTreeException; |
|
|
|
import org.eclipse.jgit.errors.NoWorkTreeException; |
|
|
|
|
|
|
|
import org.eclipse.jgit.internal.storage.file.FileRepository; |
|
|
|
import org.eclipse.jgit.junit.RepositoryTestCase; |
|
|
|
import org.eclipse.jgit.junit.RepositoryTestCase; |
|
|
|
import org.eclipse.jgit.junit.TestRepository; |
|
|
|
import org.eclipse.jgit.junit.TestRepository; |
|
|
|
import org.eclipse.jgit.lib.Config; |
|
|
|
import org.eclipse.jgit.lib.Config; |
|
|
@ -100,6 +101,13 @@ public class SubmoduleWalkTest extends RepositoryTestCase { |
|
|
|
assertEquals(ObjectId.zeroId(), gen.getObjectId()); |
|
|
|
assertEquals(ObjectId.zeroId(), gen.getObjectId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void bareRepositoryWithNoSubmodules() throws IOException { |
|
|
|
|
|
|
|
FileRepository bareRepo = createBareRepository(); |
|
|
|
|
|
|
|
boolean result = SubmoduleWalk.containsGitModulesFile(bareRepo); |
|
|
|
|
|
|
|
assertFalse(result); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void repositoryWithRootLevelSubmodule() throws IOException, |
|
|
|
public void repositoryWithRootLevelSubmodule() throws IOException, |
|
|
|
ConfigInvalidException, NoWorkTreeException, GitAPIException { |
|
|
|
ConfigInvalidException, NoWorkTreeException, GitAPIException { |
|
|
|