chiark / gitweb /
"stg pop --keep" fails because of git-apply --index (bug #8972)
authorCatalin Marinas <catalin.marinas@gmail.com>
Wed, 17 Oct 2007 20:35:21 +0000 (21:35 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 17 Oct 2007 20:35:21 +0000 (21:35 +0100)
This patch calls git-apply without --index if --keep is passed to the
pop or goto commands.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/stack.py

index f2b2afb4eb10df2171af3649ff26c96a3d44249a..ad1ed2b67ed76b1075a9c11f3548242e7163d9c3 100644 (file)
@@ -1167,7 +1167,8 @@ class Series(PatchSet):
         patch = self.get_patch(name)
 
         if git.get_head_file() == self.get_name():
-            if keep and not git.apply_diff(git.get_head(), patch.get_bottom()):
+            if keep and not git.apply_diff(git.get_head(), patch.get_bottom(),
+                                           check_index = False):
                 raise StackException(
                     'Failed to pop patches while preserving the local changes')
             git.switch(patch.get_bottom(), keep)