Browse Source

pgm: Fix missing braces in Status.run()

Change-Id: Ie30df8ed3d9a1e676f130214a173b622eaf67c6f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.4
Matthias Sohn 6 years ago
parent
commit
88d60bf51a
  1. 6
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java

6
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java

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

Loading…
Cancel
Save