jenkinsci / jenkinsci/git-plugin
[JENKINS-45900] GIT_PREVIOUS_(SUCCESSFUL_)?COMMIT is not set when the it's tag that is checkouted
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
GIT_PREVIOUS_COMMIT and GIT_PREVIOUS_SUCCESSFUL_COMMIT are set correctly when a branch is checkouted but not when a tag.
This should probably work even if we are checking out just a random commit that is currently not pointed at by any branch or tagged with any tag.
---
Originally reported by mstoykov, imported from: GIT_PREVIOUS_(SUCCESSFUL_)?COMMIT is not set when the it's tag that is checkouted
Raw content of original issue
GIT_PREVIOUS_COMMIT and GIT_PREVIOUS_SUCCESSFUL_COMMIT are set correctly when a branch is checkouted but not when a tag.
This should probably work even if we are checking out just a random commit that is currently not pointed at by any branch or tagged with any tag.
Contributor guide
Assessment
This issue has not been assessed yet.