diff options
| author | Hu xiuyun <xiuyun.hu@hisilicon.com> | 2015-12-11 11:16:41 +0800 |
|---|---|---|
| committer | David Pursehouse <dpursehouse@collab.net> | 2016-08-15 09:51:48 +0900 |
| commit | 9711a98d6c72430491361a6c77206b1a48007064 (patch) | |
| tree | d8e08c745b76b6a91dfee3857b5714d249ec8f6b /subcmds/init.py | |
| parent | 438eade413b44d3713f020e672ec74a8597efbfe (diff) | |
| download | git-repo-9711a98d6c72430491361a6c77206b1a48007064.tar.gz | |
init: Add --no-clone-bundle option
Bug: Issue 218
Change-Id: I42ba1f5fb9168875da0df6bdf4fe44c8d6498d54
Diffstat (limited to 'subcmds/init.py')
| -rw-r--r-- | subcmds/init.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index 77153eda..45d69b79 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
| @@ -61,6 +61,11 @@ directory use as much data as possible from the local reference | |||
| 61 | directory when fetching from the server. This will make the sync | 61 | directory when fetching from the server. This will make the sync |
| 62 | go a lot faster by reducing data traffic on the network. | 62 | go a lot faster by reducing data traffic on the network. |
| 63 | 63 | ||
| 64 | The --no-clone-bundle option disables any attempt to use | ||
| 65 | $URL/clone.bundle to bootstrap a new Git repository from a | ||
| 66 | resumeable bundle file on a content delivery network. This | ||
| 67 | may be necessary if there are problems with the local Python | ||
| 68 | HTTP client or proxy configuration, but the Git binary works. | ||
| 64 | 69 | ||
| 65 | Switching Manifest Branches | 70 | Switching Manifest Branches |
| 66 | --------------------------- | 71 | --------------------------- |
| @@ -113,6 +118,9 @@ to update the working directory files. | |||
| 113 | help='restrict manifest projects to ones with a specified ' | 118 | help='restrict manifest projects to ones with a specified ' |
| 114 | 'platform group [auto|all|none|linux|darwin|...]', | 119 | 'platform group [auto|all|none|linux|darwin|...]', |
| 115 | metavar='PLATFORM') | 120 | metavar='PLATFORM') |
| 121 | g.add_option('--no-clone-bundle', | ||
| 122 | dest='no_clone_bundle', action='store_true', | ||
| 123 | help='disable use of /clone.bundle on HTTP/HTTPS') | ||
| 116 | 124 | ||
| 117 | # Tool | 125 | # Tool |
| 118 | g = p.add_option_group('repo Version options') | 126 | g = p.add_option_group('repo Version options') |
| @@ -222,7 +230,8 @@ to update the working directory files. | |||
| 222 | 'in another location.', file=sys.stderr) | 230 | 'in another location.', file=sys.stderr) |
| 223 | sys.exit(1) | 231 | sys.exit(1) |
| 224 | 232 | ||
| 225 | if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet): | 233 | if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet, |
| 234 | clone_bundle=not opt.no_clone_bundle): | ||
| 226 | r = m.GetRemote(m.remote.name) | 235 | r = m.GetRemote(m.remote.name) |
| 227 | print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) | 236 | print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) |
| 228 | 237 | ||
