diff options
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java index 4dfac1447d..a81beb009a 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java @@ -543,4 +543,19 @@ public class StashApplyCommandTest extends RepositoryTestCase { assertNotNull(e.getMessage()); } } + + @Test + public void testApplyStashWithDeletedFile() throws Exception { + File file = writeTrashFile("file", "content"); + git.add().addFilepattern("file").call(); + git.commit().setMessage("x").call(); + file.delete(); + git.rm().addFilepattern("file").call(); + git.stashCreate().call(); + file.delete(); + + git.stashApply().setStashRef("stash@{0}").call(); + + assertFalse(file.exists()); + } } |