With aid of a Groovy shell and JGit looking more closely at the first two tags logged above,
//Local repo clone instantiation ommitted
tags = repo.tags
twoTags = tags.findAll {
k, _ -> [ "1.6.18.1", "3.1.10" ].contains(k)
}
twoTags.collectEntries {
k, v -> [
k, [ v.class.simpleName, v.peeled, v.objectId, v.peeledObjectId ]
]
}
yields this
===> [1.6.18.1:[PeeledTag, true, AnyObjectId[c617fb6b71266adb9ca6bff59a89ad7e06638864], AnyObjectId[9935fd11f9a3c6a93bf3120ef7d7e15a
5d130ed8]], 3.1.10:[PeeledNonTag, true, AnyObjectId[94adcf654c5ae0d4d2bb88ec01bdc43ed0bea442], null]]
A PeeledNonTag always returns a null peeledObjectId. Why the reference is not regarded as a tag is a little weird; it's clearly a tag in the upstream BitBucket repo. Windows Git 2.23.0 CLI reflects differences in the two tags.
> git show-ref --dereference "1.6.18.1" "3.1.10"
c617fb6b71266adb9ca6bff59a89ad7e06638864 refs/tags/1.6.18.1
9935fd11f9a3c6a93bf3120ef7d7e15a5d130ed8 refs/tags/1.6.18.1^{}
94adcf654c5ae0d4d2bb88ec01bdc43ed0bea442 refs/tags/3.1.10
I'm trying to figure out whether the two tags really are structurally different in the upstream BitBucket repo, or something amiss in JGit's clone, or something else. If the differences between the two tags are legitimate maybe JGitAPIImpl.getTags() will need to process PeeledNonTag types differently, returning the objectId instead of peeledObjectId. |