]> source.dussan.org Git - jgit.git/commitdiff
pgm: Fix missing braces in Describe.run() 88/135388/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 20 Jan 2019 00:46:21 +0000 (01:46 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 20 Jan 2019 00:46:21 +0000 (01:46 +0100)
Change-Id: I09e777fd4e77869952d2614ac2cde508b96d61e2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java

index 705bcd768403501b4c39294e2444877f1cfea214..d89fee623929525871fce55292e7c8542eeaf4b1 100644 (file)
@@ -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) {