I'm seeing this behavior on Jenkins 1.598, Git-Plugin 2.3.5. It appears that git-plugin first fetches all branches with depth=1 (~500MB in our case), and then it fetches the specific change it needs (~20MB). I've tested locally and the second fetch is the only one needed for a build.

> git init /path/to/.jenkins/workspace/Example-Project-Job
Fetching upstream changes from ssh://u...@example.com/Project.git
> git --version
using GIT_SSH to set credentials The Credentials for the user system user
> git fetch --tags --progress ssh://u...@example.com/Project.git +refs/heads/*:refs/remotes/origin/* --depth=1
> git config remote.origin.url ssh://u...@example.com/Project.git
> git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url ssh://u...@example.com/Project.git
Fetching upstream changes from ssh://u...@example.com/Project.git
using GIT_SSH to set credentials The Credentials for the user system user
> git fetch --tags --progress ssh://u...@example.com/Project.git refs/changes/93/3393/2
> git rev-parse 12345...123^{commit}
Checking out Revision 12345...123 (mainline)
> git config core.sparsecheckout
> git checkout -f 12345...123

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