jenkinsci / jenkinsci/git-plugin
[JENKINS-25465] ${GIT_BRANCH} macro expands full branch name + remotes instead of short name
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
Docs says that ${GIT_BRANCH} macro should expands to the full branch name, such as 'origin/master'. Otherwise(without fullName parameter), it only expands to the short name, such as 'master', but without fullName parameter it expands to 'remotes/origin/master' with fullName parameter it doesn't work at all.
---
Originally reported by
metyl, imported from: ${GIT_BRANCH} macro expands full branch name + remotes instead of short name
Raw content of original issue
Docs says that ${GIT_BRANCH} macro should expands to the full branch name, such as 'origin/master'. Otherwise(without fullName parameter), it only expands to the short name, such as 'master', but without fullName parameter it expands to 'remotes/origin/master' with fullName parameter it doesn't work at all.
environment
```
Centos OS 6,
git version 1.7.12.4,
Jenkins ver. 1.588,
GIT plugin 2.2.7
```
1 attachment
- [Parameters.PNG](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/31297/Parameters.PNG)
> 
Contributor guide
Assessment
This issue has not been assessed yet.