]> git.ipfire.org Git - thirdparty/git.git/commit
reset: integrate sparse index with --patch
authorDerrick Stolee <stolee@gmail.com>
Fri, 16 May 2025 14:55:29 +0000 (14:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 May 2025 19:02:47 +0000 (12:02 -0700)
commitefab7dc1f49ef95f00560c30bca357dd445e7cb4
tree65c3832fd7c2095c7acbc0be1d8b4f9281fb5a49
parent02ed8555f68440c5f533ad3c098ac01fc8965861
reset: integrate sparse index with --patch

Similar to the previous change for 'git add -p', the reset builtin
checked for integration with the sparse index after possibly redirecting
its logic toward the interactive logic. This means that the builtin
would expand the sparse index to a full one upon read.

Move this check earlier within cmd_reset() to improve performance here.

Add tests to guarantee that we are not universally expanding the index.
Add behavior tests to check that we are doing the same operations as a
full index.

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