DescribeCommand: Refactor to not use deprecated Repository#peel
Change-Id: I76073ad62d1bc4fc21d8a1f5fc7eb92060a73baa Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
f6c4a492d0
commit
51599ebb84
|
@ -224,12 +224,16 @@ private Optional<Ref> getBestMatch(List<Ref> tags) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ObjectId getObjectIdFromRef(Ref r) {
|
private ObjectId getObjectIdFromRef(Ref r) throws JGitInternalException {
|
||||||
ObjectId key = repo.peel(r).getPeeledObjectId();
|
try {
|
||||||
if (key == null) {
|
ObjectId key = repo.getRefDatabase().peel(r).getPeeledObjectId();
|
||||||
key = r.getObjectId();
|
if (key == null) {
|
||||||
|
key = r.getObjectId();
|
||||||
|
}
|
||||||
|
return key;
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new JGitInternalException(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
return key;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue