diff options
Diffstat (limited to 'repo')
-rwxr-xr-x | repo | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -196,6 +196,9 @@ group.add_option('-p', '--platform', | |||
196 | help='restrict manifest projects to ones with a specified ' | 196 | help='restrict manifest projects to ones with a specified ' |
197 | 'platform group [auto|all|none|linux|darwin|...]', | 197 | 'platform group [auto|all|none|linux|darwin|...]', |
198 | metavar='PLATFORM') | 198 | metavar='PLATFORM') |
199 | group.add_option('--no-clone-bundle', | ||
200 | dest='no_clone_bundle', action='store_true', | ||
201 | help='disable use of /clone.bundle on HTTP/HTTPS') | ||
199 | 202 | ||
200 | 203 | ||
201 | # Tool | 204 | # Tool |
@@ -339,7 +342,7 @@ def _Init(args, gitc_init=False): | |||
339 | can_verify = True | 342 | can_verify = True |
340 | 343 | ||
341 | dst = os.path.abspath(os.path.join(repodir, S_repo)) | 344 | dst = os.path.abspath(os.path.join(repodir, S_repo)) |
342 | _Clone(url, dst, opt.quiet) | 345 | _Clone(url, dst, opt.quiet, not opt.no_clone_bundle) |
343 | 346 | ||
344 | if can_verify and not opt.no_repo_verify: | 347 | if can_verify and not opt.no_repo_verify: |
345 | rev = _Verify(dst, branch, opt.quiet) | 348 | rev = _Verify(dst, branch, opt.quiet) |
@@ -577,7 +580,7 @@ def _ImportBundle(local): | |||
577 | os.remove(path) | 580 | os.remove(path) |
578 | 581 | ||
579 | 582 | ||
580 | def _Clone(url, local, quiet): | 583 | def _Clone(url, local, quiet, clone_bundle): |
581 | """Clones a git repository to a new subdirectory of repodir | 584 | """Clones a git repository to a new subdirectory of repodir |
582 | """ | 585 | """ |
583 | try: | 586 | try: |
@@ -607,7 +610,7 @@ def _Clone(url, local, quiet): | |||
607 | _SetConfig(local, | 610 | _SetConfig(local, |
608 | 'remote.origin.fetch', | 611 | 'remote.origin.fetch', |
609 | '+refs/heads/*:refs/remotes/origin/*') | 612 | '+refs/heads/*:refs/remotes/origin/*') |
610 | if _DownloadBundle(url, local, quiet): | 613 | if clone_bundle and _DownloadBundle(url, local, quiet): |
611 | _ImportBundle(local) | 614 | _ImportBundle(local) |
612 | _Fetch(url, local, 'origin', quiet) | 615 | _Fetch(url, local, 'origin', quiet) |
613 | 616 | ||