From 390fe5b878b98682936acf27a2e1499d8695fbca Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 21 Jan 2019 23:42:41 +0100 Subject: [PATCH] pgm: Fix missing braces in Show.run() Change-Id: I50097649f1355856e342035d54c55e65270ef507 Signed-off-by: Matthias Sohn --- org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java index fe2c0d5c5..ff3d00383 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java @@ -180,18 +180,20 @@ class Show extends TextBuiltin { diffFmt.setRepository(db); try { diffFmt.setPathFilter(pathFilter); - if (detectRenames != null) + if (detectRenames != null) { diffFmt.setDetectRenames(detectRenames.booleanValue()); + } if (renameLimit != null && diffFmt.isDetectRenames()) { RenameDetector rd = diffFmt.getRenameDetector(); rd.setRenameLimit(renameLimit.intValue()); } ObjectId objectId; - if (objectName == null) + if (objectName == null) { objectId = db.resolve(Constants.HEAD); - else + } else { objectId = db.resolve(objectName); + } try (RevWalk rw = new RevWalk(db)) { RevObject obj = rw.parseAny(objectId);