mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Reduce git fetch depth. 100 still takes quite some time!
``` (git init servo.git && cd servo.git && time git fetch https://github.com/servo/servo master $ARGS && ); rm -rf servo.git Full: 724.75 MiB 57s home fiber in Paris 1m25s AWS us-west-2 Oregon 3m23s Macstadium DC1 Atlanta 4m22s Macstadium DC2 Las Vegas --depth 100: 129.00 MiB 1m21s home 1m18s AWS 1m30s Macstadium 1 1m24s Macstadium 2 --depth 50: 97.62 MiB 30s home 30s AWS 41s Macstadium 1 40s Macstadium 2 --depth 30: 92.47 MiB 17s home 18s AWS 27s Macstadium 1 26s Macstadium 2 --depth 10: 88.25 MiB 11s home 12s AWS 26s Macstadium 1 25s Macstadium 2 --depth 1: 87.53 MiB 10s home 10s AWS 22s Macstadium 1 28s Macstadium 2 ```
This commit is contained in:
parent
a74046a3b6
commit
188dd9e7ab
1 changed files with 2 additions and 2 deletions
|
@ -477,7 +477,7 @@ class WindowsGenericWorkerTask(GenericWorkerTask):
|
|||
git += """
|
||||
git fetch {depth} %GIT_URL% %GIT_REF%
|
||||
git reset --hard %GIT_SHA%
|
||||
""".format(depth="--depth 100" if shallow else "")
|
||||
""".format(depth="--depth 30" if shallow else "")
|
||||
return self \
|
||||
.with_git() \
|
||||
.with_script(git) \
|
||||
|
@ -599,7 +599,7 @@ class UnixTaskMixin(Task):
|
|||
cd repo
|
||||
time git fetch {depth} "$GIT_URL" "$GIT_REF"
|
||||
time git reset --hard "$GIT_SHA"
|
||||
""".format(depth="--depth 100" if shallow else ""))
|
||||
""".format(depth="--depth 30" if shallow else ""))
|
||||
|
||||
def with_curl_script(self, url, file_path):
|
||||
self.curl_scripts_count += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue