chiark / gitweb /
Merge branch 'stable'
authorCatalin Marinas <catalin.marinas@gmail.com>
Thu, 17 Apr 2008 20:50:14 +0000 (21:50 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 17 Apr 2008 20:50:14 +0000 (21:50 +0100)
stgit/commands/sync.py

index 35c5c31675878ab34dcbd857e4658f3643545367..0e2c18fbf5c320032f31b8e9c92acc01ecf5f869 100644 (file)
@@ -136,11 +136,13 @@ def func(parser, options, args):
         to_pop = applied[applied.index(first_patch) + 1:]
         if to_pop:
             pop_patches(crt_series, to_pop[::-1])
+        pushed = [first_patch]
     else:
         to_pop = []
+        pushed = []
     popped = to_pop + [p for p in patches if p in unapplied]
 
-    for p in [first_patch] + popped:
+    for p in pushed + popped:
         if p in popped:
             # push this patch
             push_patches(crt_series, [p])