diff options
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index eaa6da50..32663a04 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -436,18 +436,17 @@ to update the working directory files. | |||
436 | print(' rm -r %s/.repo' % self.manifest.topdir) | 436 | print(' rm -r %s/.repo' % self.manifest.topdir) |
437 | print('and try again.') | 437 | print('and try again.') |
438 | 438 | ||
439 | def Execute(self, opt, args): | 439 | def ValidateOptions(self, opt, args): |
440 | git_require(MIN_GIT_VERSION, fail=True) | ||
441 | |||
442 | if opt.reference: | 440 | if opt.reference: |
443 | opt.reference = os.path.expanduser(opt.reference) | 441 | opt.reference = os.path.expanduser(opt.reference) |
444 | 442 | ||
445 | # Check this here, else manifest will be tagged "not new" and init won't be | 443 | # Check this here, else manifest will be tagged "not new" and init won't be |
446 | # possible anymore without removing the .repo/manifests directory. | 444 | # possible anymore without removing the .repo/manifests directory. |
447 | if opt.archive and opt.mirror: | 445 | if opt.archive and opt.mirror: |
448 | print('fatal: --mirror and --archive cannot be used together.', | 446 | self.OptionParser.error('--mirror and --archive cannot be used together.') |
449 | file=sys.stderr) | 447 | |
450 | sys.exit(1) | 448 | def Execute(self, opt, args): |
449 | git_require(MIN_GIT_VERSION, fail=True) | ||
451 | 450 | ||
452 | self._SyncManifest(opt) | 451 | self._SyncManifest(opt) |
453 | self._LinkManifest(opt.manifest_name) | 452 | self._LinkManifest(opt.manifest_name) |