summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2016-10-22 10:11:54 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2016-10-22 10:11:54 +0900
commit03046d0f60810ec01d830e6efb3291e4a161512a (patch)
tree45c5213bb43e7f0e8f265457cb6e5e47daae512e /org.eclipse.jgit.pgm/src/org
parente49025386eee85f4748b3f16ae2c63f6ff94f335 (diff)
downloadjgit-03046d0f60810ec01d830e6efb3291e4a161512a.tar.gz
jgit-03046d0f60810ec01d830e6efb3291e4a161512a.zip
CheckoutCommand: Add method to add multiple paths
The new method addPaths(List<String>) allows callers to add multiple paths without having to iterate over several calls to addPath(String). Change-Id: I2c3746a97ead7118fb0ed5543a2c843224719031 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java4
1 files changed, 1 insertions, 3 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 629b47a9a0..0c3b720fb6 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
@@ -95,9 +95,7 @@ class Checkout extends TextBuiltin {
if (paths.size() == 1 && paths.get(0).equals(".")) { //$NON-NLS-1$
command.setAllPaths(true);
} else {
- for (String path : paths) {
- command.addPath(path);
- }
+ command.addPaths(paths);
}
} else {
command.setCreateBranch(createBranch);