소스 검색

pgm: Fix missing braces in Describe.run()

Change-Id: I09e777fd4e77869952d2614ac2cde508b96d61e2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
tags/v5.3.0.201903061415-rc1
Matthias Sohn 5 년 전
부모
커밋
55a5fdb3a1
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4
    2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java

+ 4
- 2
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) {

Loading…
취소
저장