Add 'repo init --mirror' to download a complete forrest

The mirror option downloads a complete forrest (as described by the
manifest) and creates a replica of the remote repositories rather
than a client working directory.  This permits other clients to
sync off the mirror site.

A mirror can be positioned in a "DMZ", where the mirror executes
"repo sync" to obtain changes from the external upstream and
clients inside the protected zone operate off the mirror only,
and therefore do not require direct git:// access to the external
upstream repositories.

Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 9af1232..8050e51 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -102,8 +102,9 @@
       self._Fetch(*missing)
 
     for project in all:
-      if not project.Sync_LocalHalf():
-        sys.exit(1)
+      if project.worktree:
+        if not project.Sync_LocalHalf():
+          sys.exit(1)
 
 
 def _VerifyTag(project):