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 7f1ed8c14..dc605a91e 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 { } } - 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; } /**