diff options
Diffstat (limited to 'subcmds')
| -rw-r--r-- | subcmds/init.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index 86b77742..f16bee6d 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
| @@ -124,6 +124,10 @@ to update the working directory files. | |||
| 124 | dest='partial_clone', | 124 | dest='partial_clone', |
| 125 | help='perform partial clone (https://git-scm.com/' | 125 | help='perform partial clone (https://git-scm.com/' |
| 126 | 'docs/gitrepository-layout#_code_partialclone_code)') | 126 | 'docs/gitrepository-layout#_code_partialclone_code)') |
| 127 | g.add_option('--no-partial-clone', action='store_false', | ||
| 128 | dest='partial_clone', | ||
| 129 | help='disable use of partial clone (https://git-scm.com/' | ||
| 130 | 'docs/gitrepository-layout#_code_partialclone_code)') | ||
| 127 | g.add_option('--clone-filter', action='store', default='blob:none', | 131 | g.add_option('--clone-filter', action='store', default='blob:none', |
| 128 | dest='clone_filter', | 132 | dest='clone_filter', |
| 129 | help='filter for use with --partial-clone [default: %default]') | 133 | help='filter for use with --partial-clone [default: %default]') |
| @@ -311,7 +315,7 @@ to update the working directory files. | |||
| 311 | 'in another location.', file=sys.stderr) | 315 | 'in another location.', file=sys.stderr) |
| 312 | sys.exit(1) | 316 | sys.exit(1) |
| 313 | 317 | ||
| 314 | if opt.partial_clone: | 318 | if opt.partial_clone is not None: |
| 315 | if opt.mirror: | 319 | if opt.mirror: |
| 316 | print('fatal: --mirror and --partial-clone are mutually exclusive', | 320 | print('fatal: --mirror and --partial-clone are mutually exclusive', |
| 317 | file=sys.stderr) | 321 | file=sys.stderr) |
| @@ -319,6 +323,8 @@ to update the working directory files. | |||
| 319 | m.config.SetBoolean('repo.partialclone', opt.partial_clone) | 323 | m.config.SetBoolean('repo.partialclone', opt.partial_clone) |
| 320 | if opt.clone_filter: | 324 | if opt.clone_filter: |
| 321 | m.config.SetString('repo.clonefilter', opt.clone_filter) | 325 | m.config.SetString('repo.clonefilter', opt.clone_filter) |
| 326 | elif m.config.GetBoolean('repo.partialclone'): | ||
| 327 | opt.clone_filter = m.config.GetString('repo.clonefilter') | ||
| 322 | else: | 328 | else: |
| 323 | opt.clone_filter = None | 329 | opt.clone_filter = None |
| 324 | 330 | ||
