|
|
|
Change By:
|
Christian Höltje
(15/May/14 3:23 PM)
|
Description:
|
In order to speed up clones for very large repositories, I want to be able to use shallow clones.
Currently, using shallow clones ends up doing the following git commands:
{
{
code}
Cloning repository ssh://
automan@
gerrit.
bigdatalab
example
.
ibm.
com:29418/
vivisimo
myrepo.git
> git init /a/workspace/engine-copyright-check-gerrit Fetching upstream changes from ssh://
automan@
gerrit.
bigdatalab
example
.
ibm.
com:29418/
vivisimo
myrepo.git
> git --version > git fetch --tags --progress ssh://
automan@
gerrit.
bigdatalab
example
.
ibm.
com:29418/
vivisimo
myrepo.git
+refs/heads/*:refs/remotes/origin/* --depth=1 > git config remote.origin.url ssh://
automan@
gerrit.
bigdatalab
example
.
ibm.
com:29418/
vivisimo
myrepo.git
> git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url ssh://
automan@
gerrit.
bigdatalab
example
.
ibm.
com:29418/
vivisimo
myrepo.git
Fetching upstream changes from ssh://
automan@
gerrit.
bigdatalab
example
.
ibm.
com:29418/
vivisimo
myrepo.git
> git fetch --tags --progress ssh://
automan@
gerrit.
bigdatalab
example
.
ibm.
com:29418/
vivisimo +
myrepo.git
refs/changes/
*
40
/20740/1
> git rev-parse FETCH_HEAD^{commit} Checking out Revision e976b99ee4a8b6b65ea351f31c5cd4509a5eafaf (origin/release) > git config core.sparsecheckout > git checkout -f e976b99ee4a8b6b65ea351f31c5cd4509a5eafaf > git rev-parse FETCH_HEAD^{commit} > git rev-list 0ecf38b5c187d237b3689dcd2d5d52ba8c295610 {code}
I expected something more like
:
refs
{code} Cloning repository ssh:
/
remotes
/
origin
gerrit.example.com:29418
/
myrepo.git > git init /a/workspace/engine-copyright-check-gerrit Fetching upstream
changes
from ssh:
/
*
/
gerrit.example.com:29418/myrepo.git > git --version > git fetch --progress ssh://gerrit.example.com:29418/myrepo.git refs/changes/40/
20740/1
--depth=1
> git rev-parse FETCH_HEAD^{commit} Checking out Revision e976b99ee4a8b6b65ea351f31c5cd4509a5eafaf (origin/release) > git config core.sparsecheckout > git checkout -f e976b99ee4a8b6b65ea351f31c5cd4509a5eafaf > git rev-parse FETCH_HEAD^{commit} > git rev-list 0ecf38b5c187d237b3689dcd2d5d52ba8c295610
{code
}
The changes are:
1. Remove {{--tags
}
} flag 2. Fetch only those specific changes
The change, for our repository, is massively faster (a few seconds vs. 3 minutes) and less disk space (40mb vs 3gb).
|
|
|
|
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.