pgm: Fix missing braces in Reset.run()

Change-Id: I1e854ab81063601eb4ff159aabc559cb65ce6ece
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2019-01-21 23:26:27 +01:00
parent 5c05b9f38c
commit 7cee790173
1 changed files with 10 additions and 5 deletions

View File

@ -80,18 +80,23 @@ protected void run() {
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();