aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm')
-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();