summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/init.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 1bcf5463..fe3ebd2c 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -250,7 +250,7 @@ to update the working directory files.
250 m.config.SetString('repo.reference', opt.reference) 250 m.config.SetString('repo.reference', opt.reference)
251 251
252 if opt.dissociate: 252 if opt.dissociate:
253 m.config.SetString('repo.dissociate', 'true') 253 m.config.SetBoolean('repo.dissociate', opt.dissociate)
254 254
255 if opt.worktree: 255 if opt.worktree:
256 if opt.mirror: 256 if opt.mirror:
@@ -261,14 +261,14 @@ to update the working directory files.
261 print('fatal: --submodules and --worktree are incompatible', 261 print('fatal: --submodules and --worktree are incompatible',
262 file=sys.stderr) 262 file=sys.stderr)
263 sys.exit(1) 263 sys.exit(1)
264 m.config.SetString('repo.worktree', 'true') 264 m.config.SetBoolean('repo.worktree', opt.worktree)
265 if is_new: 265 if is_new:
266 m.use_git_worktrees = True 266 m.use_git_worktrees = True
267 print('warning: --worktree is experimental!', file=sys.stderr) 267 print('warning: --worktree is experimental!', file=sys.stderr)
268 268
269 if opt.archive: 269 if opt.archive:
270 if is_new: 270 if is_new:
271 m.config.SetString('repo.archive', 'true') 271 m.config.SetBoolean('repo.archive', opt.archive)
272 else: 272 else:
273 print('fatal: --archive is only supported when initializing a new ' 273 print('fatal: --archive is only supported when initializing a new '
274 'workspace.', file=sys.stderr) 274 'workspace.', file=sys.stderr)
@@ -278,7 +278,7 @@ to update the working directory files.
278 278
279 if opt.mirror: 279 if opt.mirror:
280 if is_new: 280 if is_new:
281 m.config.SetString('repo.mirror', 'true') 281 m.config.SetBoolean('repo.mirror', opt.mirror)
282 else: 282 else:
283 print('fatal: --mirror is only supported when initializing a new ' 283 print('fatal: --mirror is only supported when initializing a new '
284 'workspace.', file=sys.stderr) 284 'workspace.', file=sys.stderr)
@@ -291,7 +291,7 @@ to update the working directory files.
291 print('fatal: --mirror and --partial-clone are mutually exclusive', 291 print('fatal: --mirror and --partial-clone are mutually exclusive',
292 file=sys.stderr) 292 file=sys.stderr)
293 sys.exit(1) 293 sys.exit(1)
294 m.config.SetString('repo.partialclone', 'true') 294 m.config.SetBoolean('repo.partialclone', opt.partial_clone)
295 if opt.clone_filter: 295 if opt.clone_filter:
296 m.config.SetString('repo.clonefilter', opt.clone_filter) 296 m.config.SetString('repo.clonefilter', opt.clone_filter)
297 else: 297 else:
@@ -300,10 +300,10 @@ to update the working directory files.
300 if opt.clone_bundle is None: 300 if opt.clone_bundle is None:
301 opt.clone_bundle = False if opt.partial_clone else True 301 opt.clone_bundle = False if opt.partial_clone else True
302 else: 302 else:
303 m.config.SetString('repo.clonebundle', 'true' if opt.clone_bundle else 'false') 303 m.config.SetBoolean('repo.clonebundle', opt.clone_bundle)
304 304
305 if opt.submodules: 305 if opt.submodules:
306 m.config.SetString('repo.submodules', 'true') 306 m.config.SetBoolean('repo.submodules', opt.submodules)
307 307
308 if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet, verbose=opt.verbose, 308 if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet, verbose=opt.verbose,
309 clone_bundle=opt.clone_bundle, 309 clone_bundle=opt.clone_bundle,