From 55a5fdb3a152525a3cd36d14f8c551f14875b35b Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sun, 20 Jan 2019 01:46:21 +0100 Subject: [PATCH] pgm: Fix missing braces in Describe.run() Change-Id: I09e777fd4e77869952d2614ac2cde508b96d61e2 Signed-off-by: Matthias Sohn --- org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java index 705bcd768..d89fee623 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java @@ -73,8 +73,9 @@ class Describe extends TextBuiltin { protected void run() { try (Git git = new Git(db)) { DescribeCommand cmd = git.describe(); - if (tree != null) + if (tree != null) { cmd.setTarget(tree); + } cmd.setLong(longDesc); cmd.setMatch(patterns.toArray(new String[0])); String result = null; @@ -83,8 +84,9 @@ class Describe extends TextBuiltin { } catch (RefNotFoundException e) { throw die(CLIText.get().noNamesFound, e); } - if (result == null) + if (result == null) { throw die(CLIText.get().noNamesFound); + } outw.println(result); } catch (IOException | InvalidPatternException | GitAPIException e) {