chiark / gitweb /
'stg pop --keep' doesn't update the index
authorCatalin Marinas <catalin.marinas@gmail.com>
Wed, 14 Nov 2007 21:14:55 +0000 (21:14 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 14 Nov 2007 21:14:55 +0000 (21:14 +0000)
commite8813959aa3a7c41ffef61d06068b10519bd4830
tree75edcced95d838ceac01c03b04e859bb3ac5b5c3
parent8f6ad9212ca4cd33c3911735622f09b80f31af4f
'stg pop --keep' doesn't update the index

While git.apply_diff works correctly, the git.switch implementation
doesn't update the index (only the HEAD) and a subsequent 'stg refresh'
would merge all the popped patches into the current one ('stg refresh
--patch' fails in the same way). This patch fixes git.switch to read the
new index (git-read-tree) if keep == True.

Before commit a77bfa77 (to fix bug #8972), git-apply had the --index
option to automatically update the index but it was failing in many
cases.

The drawback is that a subsequent git-update-index takes longer than
usual, but at least we have a correct behaviour.

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