Issue Type: Bug Bug
Assignee: Nicolas De Loof
Attachments: Selection_024.png
Components: git-client-plugin
Created: 17/Feb/15 1:29 AM
Description:

I have the "refspec" empty so git plugin fetches all remote branches as documented. We are only interested in building origin/master (but we need the other branches around for the build).

I am trying to put in the branch settings things like "refs/remotes/origin/master" or just "origin/master" but whatever I type in is ignored and some other remote branch gets built. It seems like whatever gets typed in in that input box has no effect whatsoever. Even if I type a reference that does not exists like "ref/foo/bar", it will (a) not give an error, and (b) check the same random branch. Here is a console output that demonstrates:

Started by user User (user)
Building in workspace /var/lib/jenkins/jobs/continuous_test/workspace
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url ssh://jenki...@gerrit.domain.com:29418/Collectr.git # timeout=10
Fetching upstream changes from ssh://jenki...@gerrit.domain.com:29418/Collectr.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress ssh://jenki...@gerrit.domain.com:29418/Collectr.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse FETCH_HEAD^{commit} # timeout=10
Checking out Revision 02a1ad8196306911dd4ee6749326c69d549c4cba (refs/foo/bar)

Notice the "refs/foo/bar" at the end? It always checkouts the same commit, no matter what branch I give it.

Environment: Git client plugin: 1.16.1
Git plugin: 2.3.4
Project: Jenkins
Labels: plugin
Priority: Minor Minor
Reporter: Nadav Samet
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to