]> git.ipfire.org Git - thirdparty/git.git/commit
checkout: fix nested sparse directory diff in sparse index
authorVictoria Dye <vdye@github.com>
Mon, 8 Aug 2022 19:07:49 +0000 (19:07 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Aug 2022 20:21:49 +0000 (13:21 -0700)
commit49ff3cb90fee9d0591b59a4c40ac2330163cab87
treeb27d948bc350670d6a1787e6f9e3b581cef21b63
parent00d12607a27e387ad78b5957afa05e89c87e83a5
checkout: fix nested sparse directory diff in sparse index

Add the 'recursive' diff flag to the local changes reporting done by 'git
checkout' in 'show_local_changes()'. Without the flag enabled, unexpanded
sparse directories will not be recursed into to report the diff of each
file's contents, resulting in the reported local changes including
"modified" sparse directories.

The same issue was found and fixed for 'git status' in 2c521b0e49 (status:
fix nested sparse directory diff in sparse index, 2022-03-01)

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c
t/t1092-sparse-checkout-compatibility.sh