aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit
diff options
context:
space:
mode:
authorKevin Sawicki <kevin@github.com>2012-02-26 16:10:57 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2012-02-26 16:10:57 +0100
commit10c0b34b88fe351405c45c19916b0bd627179c7d (patch)
tree46199161e751bf4c55c74c4d6f7059658849ed0d /org.eclipse.jgit.test/tst/org/eclipse/jgit
parent709cd52958e9794827496ce64971a65521ad02d1 (diff)
downloadjgit-10c0b34b88fe351405c45c19916b0bd627179c7d.tar.gz
jgit-10c0b34b88fe351405c45c19916b0bd627179c7d.zip
Add all paths option to CheckoutCommand
This will perform the equivalent of running a 'git checkout -- .' at the root of a repository Change-Id: I3e2dd563700999bc063effdd3640499c8ed08136 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java
index 20a1acbd99..243d791cd2 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PathCheckoutCommandTest.java
@@ -233,4 +233,14 @@ public class PathCheckoutCommandTest extends RepositoryTestCase {
assertEquals(0, status.getRemoved().size());
assertEquals(0, status.getUntracked().size());
}
+
+ @Test
+ public void testCheckoutRepository() throws Exception {
+ CheckoutCommand co = git.checkout();
+ File test = writeTrashFile(FILE1, "");
+ File test2 = writeTrashFile(FILE2, "");
+ co.setStartPoint("HEAD~2").setAllPaths(true).call();
+ assertEquals("1", read(test));
+ assertEquals("a", read(test2));
+ }
}