From 156e2508a31d8835ec4e5ba7e206ecd2e406f202 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Mon, 16 Sep 2024 05:35:21 -0600 Subject: [PATCH] [JENKINS-73781] Replace JGit peel() with getRefDatabase().peel() 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. https://github.com/jenkinsci/git-client-plugin/pull/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. --- .../com/github/jenkins/lastchanges/impl/GitLastChanges.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/jenkins/lastchanges/impl/GitLastChanges.java b/src/main/java/com/github/jenkins/lastchanges/impl/GitLastChanges.java index b334830..5917640 100644 --- a/src/main/java/com/github/jenkins/lastchanges/impl/GitLastChanges.java +++ b/src/main/java/com/github/jenkins/lastchanges/impl/GitLastChanges.java @@ -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());