|
@@ -196,6 +196,9 @@ group.add_option('-p', '--platform',
|
|
|
help='restrict manifest projects to ones with a specified '
|
|
help='restrict manifest projects to ones with a specified '
|
|
|
'platform group [auto|all|none|linux|darwin|...]',
|
|
'platform group [auto|all|none|linux|darwin|...]',
|
|
|
metavar='PLATFORM')
|
|
metavar='PLATFORM')
|
|
|
|
|
+group.add_option('--no-clone-bundle',
|
|
|
|
|
+ dest='no_clone_bundle', action='store_true',
|
|
|
|
|
+ help='disable use of /clone.bundle on HTTP/HTTPS')
|
|
|
|
|
|
|
|
|
|
|
|
|
# Tool
|
|
# Tool
|
|
@@ -339,7 +342,7 @@ def _Init(args, gitc_init=False):
|
|
|
can_verify = True
|
|
can_verify = True
|
|
|
|
|
|
|
|
dst = os.path.abspath(os.path.join(repodir, S_repo))
|
|
dst = os.path.abspath(os.path.join(repodir, S_repo))
|
|
|
- _Clone(url, dst, opt.quiet)
|
|
|
|
|
|
|
+ _Clone(url, dst, opt.quiet, not opt.no_clone_bundle)
|
|
|
|
|
|
|
|
if can_verify and not opt.no_repo_verify:
|
|
if can_verify and not opt.no_repo_verify:
|
|
|
rev = _Verify(dst, branch, opt.quiet)
|
|
rev = _Verify(dst, branch, opt.quiet)
|
|
@@ -577,7 +580,7 @@ def _ImportBundle(local):
|
|
|
os.remove(path)
|
|
os.remove(path)
|
|
|
|
|
|
|
|
|
|
|
|
|
-def _Clone(url, local, quiet):
|
|
|
|
|
|
|
+def _Clone(url, local, quiet, clone_bundle):
|
|
|
"""Clones a git repository to a new subdirectory of repodir
|
|
"""Clones a git repository to a new subdirectory of repodir
|
|
|
"""
|
|
"""
|
|
|
try:
|
|
try:
|
|
@@ -607,7 +610,7 @@ def _Clone(url, local, quiet):
|
|
|
_SetConfig(local,
|
|
_SetConfig(local,
|
|
|
'remote.origin.fetch',
|
|
'remote.origin.fetch',
|
|
|
'+refs/heads/*:refs/remotes/origin/*')
|
|
'+refs/heads/*:refs/remotes/origin/*')
|
|
|
- if _DownloadBundle(url, local, quiet):
|
|
|
|
|
|
|
+ if clone_bundle and _DownloadBundle(url, local, quiet):
|
|
|
_ImportBundle(local)
|
|
_ImportBundle(local)
|
|
|
_Fetch(url, local, 'origin', quiet)
|
|
_Fetch(url, local, 'origin', quiet)
|
|
|
|
|
|