Created
August 13, 2012 08:20
-
-
Save robinst/3338160 to your computer and use it in GitHub Desktop.
JGit checkout of directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testCheckoutOfDirectoryShouldBeRecursive() throws Exception { | |
File a = writeTrashFile("dir/a.txt", "A"); | |
File b = writeTrashFile("dir/sub/b.txt", "B"); | |
git.add().addFilepattern("dir").call(); | |
write(a, "modified"); | |
write(b, "modified"); | |
git.checkout().addPath("dir").call(); | |
assertThat(read(a), is("A")); | |
assertThat(read(b), is("B")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment