summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorNed Twigg <ned.twigg@diffplug.com>2016-03-18 02:46:38 -0700
committerDavid Pursehouse <david.pursehouse@gmail.com>2016-10-22 10:08:07 +0900
commite49025386eee85f4748b3f16ae2c63f6ff94f335 (patch)
treea707308582dae48c0deeb0e0a18fe8ff51519208 /org.eclipse.jgit.pgm
parentc6459a6167b72039f94f05c00566ce7a324ec23a (diff)
downloadjgit-e49025386eee85f4748b3f16ae2c63f6ff94f335.tar.gz
jgit-e49025386eee85f4748b3f16ae2c63f6ff94f335.zip
Checkout: Add the ability to checkout all paths.
Change-Id: Ie1e59c566b63d0dfac231e44e7ebd7f3f08f3e9f Signed-off-by: Ned Twigg <ned.twigg@diffplug.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
index 94517dbf2f..629b47a9a0 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
@@ -92,8 +92,13 @@ class Checkout extends TextBuiltin {
CheckoutCommand command = git.checkout();
if (paths.size() > 0) {
command.setStartPoint(name);
- for (String path : paths)
- command.addPath(path);
+ if (paths.size() == 1 && paths.get(0).equals(".")) { //$NON-NLS-1$
+ command.setAllPaths(true);
+ } else {
+ for (String path : paths) {
+ command.addPath(path);
+ }
+ }
} else {
command.setCreateBranch(createBranch);
command.setName(name);