Skip to content

Commit

Permalink
[JENKINS-73781] Replace JGit peel() with getRefDatabase().peel()
Browse files Browse the repository at this point in the history
https://issues.jenkins.io/browse/JENKINS-73781 notes that JGit
deprecated peel() in favor of getRefDatabase().peel() a long time ago.
The deprecated method was removed from JGit 7.0.0.  This uses the
replacement method that has been available since the deprecation.

jenkinsci/git-client-plugin#1170 is the git
client plugin pull request that introduced JGit 7.0.0.

https://github.com/jenkinsci/git-client-plugin/releases/tag/git-client-6.0.0
is the git client plugin release that introduced JGit 7.0.0.
  • Loading branch information
MarkEWaite authored and rmpestano committed Nov 23, 2024
1 parent 9e6b62b commit 156e250
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public int compare(Ref o1, Ref o2) {

if (tags != null && !tags.isEmpty()) {
Ref tag = tags.get(0);
Ref peeledRef = repository.peel(tag);
Ref peeledRef = repository.getRefDatabase().peel(tag);
LogCommand log = git.log();
if (peeledRef.getPeeledObjectId() != null) {
log.add(peeledRef.getPeeledObjectId());
Expand Down

0 comments on commit 156e250

Please sign in to comment.