|
|
@ -119,12 +119,14 @@ public class RepoCommandSymlinkTest extends RepositoryTestCase { |
|
|
|
.setURI(rootUri).call(); |
|
|
|
.setURI(rootUri).call(); |
|
|
|
// Clone it
|
|
|
|
// Clone it
|
|
|
|
File directory = createTempDirectory("testCopyFileBare"); |
|
|
|
File directory = createTempDirectory("testCopyFileBare"); |
|
|
|
Repository localDb = Git.cloneRepository().setDirectory(directory) |
|
|
|
try (Repository localDb = Git.cloneRepository() |
|
|
|
|
|
|
|
.setDirectory(directory) |
|
|
|
.setURI(remoteDb.getDirectory().toURI().toString()).call() |
|
|
|
.setURI(remoteDb.getDirectory().toURI().toString()).call() |
|
|
|
.getRepository(); |
|
|
|
.getRepository()) { |
|
|
|
|
|
|
|
|
|
|
|
// The LinkedHello symlink should exist.
|
|
|
|
// The LinkedHello symlink should exist.
|
|
|
|
File linkedhello = new File(localDb.getWorkTree(), "LinkedHello"); |
|
|
|
File linkedhello = new File(localDb.getWorkTree(), |
|
|
|
|
|
|
|
"LinkedHello"); |
|
|
|
assertTrue("The LinkedHello file should exist", |
|
|
|
assertTrue("The LinkedHello file should exist", |
|
|
|
localDb.getFS().exists(linkedhello)); |
|
|
|
localDb.getFS().exists(linkedhello)); |
|
|
|
assertTrue("The LinkedHello file should be a symlink", |
|
|
|
assertTrue("The LinkedHello file should be a symlink", |
|
|
@ -133,7 +135,8 @@ public class RepoCommandSymlinkTest extends RepositoryTestCase { |
|
|
|
localDb.getFS().readSymLink(linkedhello)); |
|
|
|
localDb.getFS().readSymLink(linkedhello)); |
|
|
|
|
|
|
|
|
|
|
|
// The foo/LinkedHello file should be skipped.
|
|
|
|
// The foo/LinkedHello file should be skipped.
|
|
|
|
File linkedfoohello = new File(localDb.getWorkTree(), "foo/LinkedHello"); |
|
|
|
File linkedfoohello = new File(localDb.getWorkTree(), |
|
|
|
|
|
|
|
"foo/LinkedHello"); |
|
|
|
assertFalse("The foo/LinkedHello file should be skipped", |
|
|
|
assertFalse("The foo/LinkedHello file should be skipped", |
|
|
|
localDb.getFS().exists(linkedfoohello)); |
|
|
|
localDb.getFS().exists(linkedfoohello)); |
|
|
|
|
|
|
|
|
|
|
@ -156,8 +159,7 @@ public class RepoCommandSymlinkTest extends RepositoryTestCase { |
|
|
|
localDb.getFS().isSymLink(linkedbarfoohello)); |
|
|
|
localDb.getFS().isSymLink(linkedbarfoohello)); |
|
|
|
assertEquals("../baz/hello.txt", |
|
|
|
assertEquals("../baz/hello.txt", |
|
|
|
localDb.getFS().readSymLink(linkedbarfoohello)); |
|
|
|
localDb.getFS().readSymLink(linkedbarfoohello)); |
|
|
|
|
|
|
|
} |
|
|
|
localDb.close(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|