pgm: Fix missing braces in Describe.run()

Change-Id: I09e777fd4e77869952d2614ac2cde508b96d61e2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2019-01-20 01:46:21 +01:00
parent 11a9075536
commit 55a5fdb3a1
1 changed files with 4 additions and 2 deletions

View 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 @@ protected void run() {
} 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) {