Previous to the update of the git plugin everything was working fine (with Git plugin version 3.4.1).
After updating to version 3.5.0 now I am not able to build neither merque-requests nor tags, I only see regular branches from the repository (GitLab by the way).
I've been looking changes made in the code, more precisely changes made in
There has been a major change in the way branches are discovered (that can be seen in the function "discoverBranches"):
- 3.4.1 - In this version, "client.getRemoteBranches" is used, which I guess, corresponds to a "git branch -r". Then it parses the output to get the names of the branches.
- 3.5.0 - In this version, "client.getRemoteReferences" is used, that corresponds to a "git ls-remote -h". Then, it parses the output to get the names of the branches.
I've set "Specify ref specs" with the needed values to be able to fetch the merge-requests and the tags ('+refs/merge-requests//head:refs/remotes/origin/merge-requests/' and '+refs/tags/:refs/remotes/origin/tags/').
If I perform manually both operations ("git branch -r" and "git ls-remote -h") the output is not the same:
$ git branch -r
origin/HEAD -> origin/master
$ git ls-remote -h
In the first example (mimics Git plugin 3.4.1) I get merge-requests and tags, in the second (mimics 3.5.0) I don't.