jenkinsci / jenkinsci/git-plugin
[JENKINS-68617] Annotated tags timestamp is not honored
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
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
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
Basic Branch Build Strategies Plugin v1.3.2
Git Plugin v4.10.3
```
Contributor guide
Assessment
This issue has not been assessed yet.