diff --git a/pom.xml b/pom.xml
index e322f831e1..8b985437d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,7 @@
2.516
${jenkins.baseline}.3
- 7.7.1.202607240634-r
+ 7.8.0.202609011348-r
Max
Low
false
diff --git a/src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java b/src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java
index 94e63ed330..15ba2cdb72 100644
--- a/src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java
+++ b/src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java
@@ -2714,9 +2714,10 @@ public List getBranchesContaining(String revspec, boolean allBranches)
}
RevCommit target = walk.parseCommit(id);
- // we can track up to 23 flags at a time in JGit, so that's how many branches we will traverse in every
- // iteration. Changed from 24 to 23 in JGit 7.5.0 with the additional of the global UNSHALLOW
- final int MAX_FLAGS = 23;
+ // we can track up to 19 flags at a time in JGit, so that's how many branches we will traverse in every
+ // iteration. Changed from 24 to 23 in JGit 7.5.0 with the addition of the global UNSHALLOW.
+ // Changed from 23 to 19 in JGit 7.8.0.
+ final int MAX_FLAGS = 19;
List flags = new ArrayList<>(MAX_FLAGS);
for (int i = 0; i < MAX_FLAGS; i++) {
flags.add(walk.newFlag("branch" + i));