chiark / gitweb /
Don't have a global crt_series in stgit.commans.common
[stgit] / stgit / commands / fold.py
index 6e431012f4644a55bec353b7449c8d0e6694f154..3930a1f78f1e887f560aa67abb740817d0e51fe9 100644 (file)
@@ -50,7 +50,7 @@ def func(parser, options, args):
 
     check_local_changes()
     check_conflicts()
-    check_head_top_equal()
+    check_head_top_equal(crt_series)
 
     if len(args) == 1:
         filename = args[0]
@@ -74,7 +74,8 @@ def func(parser, options, args):
         bottom = crt_patch.get_bottom()
         git.apply_patch(filename = filename, base = bottom)
     elif options.base:
-        git.apply_patch(filename = filename, base = git_id(options.base))
+        git.apply_patch(filename = filename,
+                        base = git_id(crt_series, options.base))
     else:
         git.apply_patch(filename = filename)