Make 'push --undo' safer
[stgit] / stgit / commands / clone.py
index f4e3f6b..455dd6e 100644 (file)
@@ -51,6 +51,9 @@ def func(parser, options, args):
     os.chdir(local_dir)
     git.checkout(tree_id = 'HEAD')
 
-    crt_series.init()
+    # be sure to forget any cached value for .git, since we're going
+    # to work on a brand new repository
+    basedir.clear_cache()
+    stack.Series().init()
 
     print 'done'