Sfoglia il codice sorgente

Fix repo re-init in a mirror to not prompt

On a mirror client we don't prompt for user.name,user.email as the
data is only necessary if you will make new commits.  On a re-init
we were testing the command line option, not the existing IsMirror
property from the manifest configuration file.

Signed-off-by: Shawn O. Pearce <sop@google.com>
Shawn O. Pearce 17 anni fa
parent
commit
8630f39dba
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      subcmds/init.py

+ 2 - 2
subcmds/init.py

@@ -202,11 +202,11 @@ default.xml will be used.
     self._SyncManifest(opt)
     self._LinkManifest(opt.manifest_name)
 
-    if os.isatty(0) and os.isatty(1) and not opt.mirror:
+    if os.isatty(0) and os.isatty(1) and not self.manifest.IsMirror:
       self._ConfigureUser()
       self._ConfigureColor()
 
-    if opt.mirror:
+    if self.manifest.IsMirror:
       type = 'mirror '
     else:
       type = ''