Skip to content

Commit c9231bf

Browse files
committed
bug(#85): fix refresh crashes when index contains added files and path limiting
Signed-off-by: Oleg Utkin <[email protected]>
1 parent b4eba25 commit c9231bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stgit/lib/git/iw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ def refresh_index(self):
332332
def update_index(self, paths):
333333
"""Update the index with files from the worktree. C{paths} is an
334334
iterable of paths relative to the root of the repository."""
335-
self.run(['git', 'update-index', '--remove', '-z', '--stdin']).input_nulterm(
336-
paths
337-
).discard_output()
335+
self.run(
336+
['git', 'update-index', '--remove', '--add', '-z', '--stdin']
337+
).input_nulterm(paths).discard_output()
338338

339339
def worktree_clean(self):
340340
"""Check whether the worktree is clean relative to index."""

0 commit comments

Comments
 (0)