Merge "Make local git dir creation optional"
diff --git a/jeepyb/cmd/manage_projects.py b/jeepyb/cmd/manage_projects.py
index fcdcdba..4ca3e27 100644
--- a/jeepyb/cmd/manage_projects.py
+++ b/jeepyb/cmd/manage_projects.py
@@ -428,7 +428,7 @@
 
     default_has_github = registry.get_defaults('has-github', True)
 
-    LOCAL_GIT_DIR = registry.get_defaults('local-git-dir', '/var/lib/git')
+    LOCAL_GIT_DIR = registry.get_defaults('local-git-dir', None)
     JEEPYB_CACHE_DIR = registry.get_defaults('jeepyb-cache-dir',
                                              '/var/lib/jeepyb')
     ACL_DIR = registry.get_defaults('acl-dir')
@@ -547,9 +547,12 @@
                         gerrit.replicate(project)
 
                 # Create the repo for the local git mirror
-                create_local_mirror(
-                    LOCAL_GIT_DIR, project_git,
-                    GERRIT_OS_SYSTEM_USER, GERRIT_OS_SYSTEM_GROUP)
+                if LOCAL_GIT_DIR:
+                    # This is conditional because new gerrit url pathing
+                    # has made local git mirrors less straightfoward.
+                    create_local_mirror(
+                        LOCAL_GIT_DIR, project_git,
+                        GERRIT_OS_SYSTEM_USER, GERRIT_OS_SYSTEM_GROUP)
 
                 if acl_config:
                     acl_sha = acl_cache.get(acl_config)