|
|
@ -73,8 +73,9 @@ class Describe extends TextBuiltin { |
|
|
|
protected void run() { |
|
|
|
protected void run() { |
|
|
|
try (Git git = new Git(db)) { |
|
|
|
try (Git git = new Git(db)) { |
|
|
|
DescribeCommand cmd = git.describe(); |
|
|
|
DescribeCommand cmd = git.describe(); |
|
|
|
if (tree != null) |
|
|
|
if (tree != null) { |
|
|
|
cmd.setTarget(tree); |
|
|
|
cmd.setTarget(tree); |
|
|
|
|
|
|
|
} |
|
|
|
cmd.setLong(longDesc); |
|
|
|
cmd.setLong(longDesc); |
|
|
|
cmd.setMatch(patterns.toArray(new String[0])); |
|
|
|
cmd.setMatch(patterns.toArray(new String[0])); |
|
|
|
String result = null; |
|
|
|
String result = null; |
|
|
@ -83,8 +84,9 @@ class Describe extends TextBuiltin { |
|
|
|
} catch (RefNotFoundException e) { |
|
|
|
} catch (RefNotFoundException e) { |
|
|
|
throw die(CLIText.get().noNamesFound, e); |
|
|
|
throw die(CLIText.get().noNamesFound, e); |
|
|
|
} |
|
|
|
} |
|
|
|
if (result == null) |
|
|
|
if (result == null) { |
|
|
|
throw die(CLIText.get().noNamesFound); |
|
|
|
throw die(CLIText.get().noNamesFound); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
outw.println(result); |
|
|
|
outw.println(result); |
|
|
|
} catch (IOException | InvalidPatternException | GitAPIException e) { |
|
|
|
} catch (IOException | InvalidPatternException | GitAPIException e) { |
|
|
|