summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-01-21 23:26:27 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2019-01-21 23:26:27 +0100
commit7cee790173d59281778372eee9c982fd36e96342 (patch)
treee4b3f6c2eb1b2533894808d0d6765e898666d3c9
parent5c05b9f38c89b8d8c4dc8181e918c57589c96921 (diff)
downloadjgit-7cee790173d59281778372eee9c982fd36e96342.tar.gz
jgit-7cee790173d59281778372eee9c982fd36e96342.zip
pgm: Fix missing braces in Reset.run()
Change-Id: I1e854ab81063601eb4ff159aabc559cb65ce6ece Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
index 7f0396918c..bb81ffbd38 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
@@ -80,18 +80,23 @@ class Reset extends TextBuiltin {
ResetCommand command = git.reset();
command.setRef(commit);
if (paths.size() > 0) {
- for (String path : paths)
+ for (String path : paths) {
command.addPath(path);
+ }
} else {
ResetType mode = null;
- if (soft)
+ if (soft) {
mode = selectMode(mode, ResetType.SOFT);
- if (mixed)
+ }
+ if (mixed) {
mode = selectMode(mode, ResetType.MIXED);
- if (hard)
+ }
+ if (hard) {
mode = selectMode(mode, ResetType.HARD);
- if (mode == null)
+ }
+ if (mode == null) {
throw die("no reset mode set"); //$NON-NLS-1$
+ }
command.setMode(mode);
}
command.call();