]> git.ipfire.org Git - thirdparty/git.git/commit
t1092: test 'git restore' with sparse index
authorDerrick Stolee <stolee@gmail.com>
Tue, 26 May 2026 20:26:33 +0000 (20:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 May 2026 04:42:59 +0000 (13:42 +0900)
commitca7b9ae3403b1a46fffbdae312092c4029470eee
treeffd8d8194712eaab11faa58ef23ce251984c7efe
parent6a4418c36d6bad69a599044b3cf49dcbd049cb45
t1092: test 'git restore' with sparse index

A user reported that 'git restore --staged .' causes the sparse index to
expand. This is somewhat natural because the '.' pathspec means 'check
every path'. However, the restore will not update paths marked with the
SKIP_WORKTREE bit, so we shouldn't need to process such entries.

For now, establish the current behavior, including the sparse index
expansion, in the t1092 test case as a baseline.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1092-sparse-checkout-compatibility.sh