aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib
diff options
context:
space:
mode:
authorJevgeni Zelenkov <jevgeni.zelenkov@gmail.com>2012-08-06 08:59:28 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2012-08-06 08:59:28 +0200
commit803debd7be76a2f18624254409228433c9c329f2 (patch)
treed44f7c61e69fd73d7301c6c56cd751d448b6bfb8 /org.eclipse.jgit.test/tst/org/eclipse/jgit/lib
parentd08b35532a2403b0f1b2dbb68436cfa68d2b924a (diff)
downloadjgit-803debd7be76a2f18624254409228433c9c329f2.tar.gz
jgit-803debd7be76a2f18624254409228433c9c329f2.zip
Ensure a directory exists before trying to create/merge a file into it.
Since git doesn't keep track of empty directories, they should be created first. Test case included demonstrates that using StashApplyCommand(). Bugfix is applied to the DirCacheCheckout class, because StashApplyCommand() uses it internally to apply a stash. Change-Id: Iac259229ef919f9e92e7e51a671d877172bb88a8 Signed-off-by: Jevgeni Zelenkov <jevgeni.zelenkov@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/lib')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java
index c06322e8e4..457fd1a7ef 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java
@@ -102,6 +102,12 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
return JGitTestUtil.writeTrashFile(db, name, data);
}
+ protected File writeTrashFile(final String subdir, final String name,
+ final String data)
+ throws IOException {
+ return JGitTestUtil.writeTrashFile(db, subdir, name, data);
+ }
+
protected void deleteTrashFile(final String name) throws IOException {
JGitTestUtil.deleteTrashFile(db, name);
}