summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
index 7f1ed8c148..dc605a91e5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
@@ -224,12 +224,16 @@ public class DescribeCommand extends GitCommand<String> {
}
}
- private ObjectId getObjectIdFromRef(Ref r) {
- ObjectId key = repo.peel(r).getPeeledObjectId();
- if (key == null) {
- key = r.getObjectId();
+ private ObjectId getObjectIdFromRef(Ref r) throws JGitInternalException {
+ try {
+ ObjectId key = repo.getRefDatabase().peel(r).getPeeledObjectId();
+ if (key == null) {
+ key = r.getObjectId();
+ }
+ return key;
+ } catch (IOException e) {
+ throw new JGitInternalException(e.getMessage(), e);
}
- return key;
}
/**