Browse Source

pgm: Fix missing braces in Show.run()

Change-Id: I50097649f1355856e342035d54c55e65270ef507
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.4
Matthias Sohn 6 years ago
parent
commit
390fe5b878
  1. 8
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java

8
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);

Loading…
Cancel
Save