[JENKINS-68617] Annotated tags timestamp is not honored
When investigating JENKINS-57772 I have found that contrary to this comment the git plugin does not set the timestamp for annotated tags to the tag date.
Currently I can not find any references in the git-plugin source which instantiates this class with an annotated tag's timestamp, however I can find references where it does it with the underlying commit's date:
- https://github.com/jenkinsci/git-plugin/blob/5e7d735c4d24a6e54a7494381a0f6e80dd5f948c/src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java#L765
- https://github.com/jenkinsci/git-plugin/blob/5e7d735c4d24a6e54a7494381a0f6e80dd5f948c/src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java#L990
It seems like this behavior causes the problems outlined in the issue above. Reproduction steps also can be found in the said issue.
Originally reported by rozgonik, imported from: Annotated tags timestamp is not honored
- status: Open
- priority: Major
- component(s): git-plugin
- resolution: Unresolved
- votes: 0
- watchers: 2
- imported: 2025-12-02
Raw content of original issue
When investigating JENKINS-57772 I have found that contrary to this comment the git plugin does not set the timestamp for annotated tags to the tag date.
Currently I can not find any references in the git-plugin source which instantiates this class with an annotated tag's timestamp, however I can find references where it does it with the underlying commit's date:
- https://github.com/jenkinsci/git-plugin/blob/5e7d735c4d24a6e54a7494381a0f6e80dd5f948c/src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java#L765
- https://github.com/jenkinsci/git-plugin/blob/5e7d735c4d24a6e54a7494381a0f6e80dd5f948c/src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java#L990
It seems like this behavior causes the problems outlined in the issue above. Reproduction steps also can be found in the said issue.
environment
Jenkins v2.319.3<br/>
Basic Branch Build Strategies Plugin v1.3.2<br/>
Git Plugin v4.10.3