Skip to content

Commit 43d600e

Browse files
committed
fixup! checkout-index: add --sparse option
Needed to maintain existing behavior for stash. This should not cause a major performance hit, since the index being checked-out contains only the untracked files stashed with a prior `git stash -u`. Signed-off-by: Victoria Dye <[email protected]>
1 parent f2bf729 commit 43d600e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/stash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static int restore_untracked(struct object_id *u_tree)
350350

351351
child_process_init(&cp);
352352
cp.git_cmd = 1;
353-
strvec_pushl(&cp.args, "checkout-index", "--all", NULL);
353+
strvec_pushl(&cp.args, "checkout-index", "--all", "--sparse", NULL);
354354
strvec_pushf(&cp.env_array, "GIT_INDEX_FILE=%s",
355355
stash_index_path.buf);
356356

0 commit comments

Comments
 (0)