aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo
diff options
context:
space:
mode:
authorYuxuan 'fishy' Wang <fishywang@google.com>2015-12-17 18:27:56 -0800
committerYuxuan 'fishy' Wang <fishywang@google.com>2015-12-22 14:05:35 -0800
commitd88695e41277fa36dd4ba5163e232cf0c39cbb51 (patch)
tree3daea55ad3f6226f1acf1a80c699adfbaeeefdcb /org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo
parentda5ac45c25d02c7619e870ab333aa7aa8de4520a (diff)
downloadjgit-d88695e41277fa36dd4ba5163e232cf0c39cbb51.tar.gz
jgit-d88695e41277fa36dd4ba5163e232cf0c39cbb51.zip
Skip nested copyfiles in RepoCommand.
Similar to nested directories, nested copyfiles won't work with git submodule either. Change-Id: Idbe965ec20a682fca0432802858162f8238f05de Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java
index b6649b3f05..524d0b8e7e 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java
@@ -409,6 +409,7 @@ public class RepoCommandTest extends RepositoryTestCase {
.append("<project path=\"foo\" name=\"").append(defaultUri)
.append("\" revision=\"").append(BRANCH).append("\" >")
.append("<copyfile src=\"hello.txt\" dest=\"Hello\" />")
+ .append("<copyfile src=\"hello.txt\" dest=\"foo/Hello\" />")
.append("</project>").append("</manifest>");
JGitTestUtil.writeTrashFile(tempDb, "manifest.xml",
xmlContent.toString());
@@ -423,8 +424,12 @@ public class RepoCommandTest extends RepositoryTestCase {
.getRepository();
// The Hello file should exist
File hello = new File(localDb.getWorkTree(), "Hello");
- localDb.close();
assertTrue("The Hello file should exist", hello.exists());
+ // The foo/Hello file should be skipped.
+ File foohello = new File(localDb.getWorkTree(), "foo/Hello");
+ assertFalse(
+ "The foo/Hello file should be skipped", foohello.exists());
+ localDb.close();
// The content of Hello file should be expected
BufferedReader reader = new BufferedReader(new FileReader(hello));
String content = reader.readLine();