I am using Branch Specifier option of Jenkins Git plugin (v2.0) to run build on specific branch, e.g. 1.4.
${GIT_BRANCH} in this case contains origin/1.4 value.
How can I receive a name of the local Git branch used for cloning (i.e. just 1.4 without origin/ prefix?
I've tried Check out to specific local branch Additional Behaviour with branch name 1.4, but nothing had changed.
I've seen related PR on GitHub, but it was declined (as it fixes only one case with just origin remote).

