diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java index 039384db7..dfc8a9436 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java @@ -93,9 +93,11 @@ class Status extends TextBuiltin { protected void run() { try (Git git = new Git(db)) { StatusCommand statusCommand = git.status(); - if (filterPaths != null && filterPaths.size() > 0) - for (String path : filterPaths) + if (filterPaths != null && filterPaths.size() > 0) { + for (String path : filterPaths) { statusCommand.addPath(path); + } + } org.eclipse.jgit.api.Status status = statusCommand.call(); printStatus(status); } catch (GitAPIException | NoWorkTreeException | IOException e) {