summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-07-03 20:06:13 -0700
committerShawn O. Pearce <sop@google.com>2009-07-03 20:50:52 -0700
commit7354d8891480f5eaa535acc38a24f42ea63b18a6 (patch)
treed8e9f479a031563f7dede6ed2402c81bebfb97f3
parentce86abbe8ab9389fbad9d375e3754ed054d8b744 (diff)
downloadgit-repo-7354d8891480f5eaa535acc38a24f42ea63b18a6.tar.gz
init: Ensure repo.mirror is noticed once set
If we don't clear the cache, there can be a timestamp race between the pickle file and the raw text file, and we may not pick up the edit when we create a new config object around the same path name. Signed-off-by: Shawn O. Pearce <sop@google.com>
-rw-r--r--subcmds/init.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 0075b0b4..0586721f 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -117,6 +117,7 @@ to update the working directory files.
117 if opt.mirror: 117 if opt.mirror:
118 if is_new: 118 if is_new:
119 m.config.SetString('repo.mirror', 'true') 119 m.config.SetString('repo.mirror', 'true')
120 m.config.ClearCache()
120 else: 121 else:
121 print >>sys.stderr, 'fatal: --mirror not supported on existing client' 122 print >>sys.stderr, 'fatal: --mirror not supported on existing client'
122 sys.exit(1) 123 sys.exit(1)