I am trying to use git describe to retrieve the latest tag name for the current branch, but I'm facing unexpected warnings in the output.
-> git describe
warning: tag 'v0.0.6' is externally known as 'refs/tags/v0.0.6'
refs/tags/v0.0.6-0-g5392899
-> git describe --tags
warning: tag 'v0.0.6' is externally known as 'refs/tags/v0.0.6'
refs/tags/v0.0.6-0-g5392899
-> git describe --tags --abbrev=0
warning: tag 'v0.0.6' is externally known as 'refs/tags/v0.0.6'
refs/tags/v0.0.6-0-g5392899c48d700b48e0dda16129dac6a60bb3b1e
As indicated, the tags locally do not have the refs/tags prefix:
-> git tag -l
v0.0.1
v0.0.2
v0.0.3
v0.0.4
v0.0.5
v0.0.6
However, I'm not sure why the warning is being received or what I can do about it.
The tags were not deleted and recreated, nor have they been renamed.
The tags are created from our build environment (Jenkins).
Is there something I can do to correct or work around the warning?
-> git show
commit 5392899c48d700b48e0dda16129dac6a60bb3b1e (HEAD -> master, tag: v0.0.6, origin/master, origin/HEAD)
...
-> git --version
git version 2.30.1 (Apple Git-130)
Edit:
Our Jenkins build which creates the tags uses jgit. The configuration for checking out the branch/code is as follows:

