]> git.ipfire.org Git - thirdparty/git.git/commit
t1092: replace 'read-cache --table' with 'ls-files --sparse'
authorDerrick Stolee <dstolee@microsoft.com>
Wed, 22 Dec 2021 14:20:54 +0000 (14:20 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Dec 2021 19:42:40 +0000 (11:42 -0800)
commit3a9a6ac5d9df68152795e66acba02afd928bf705
tree7e0bf834a6442fdbd15d0039e7a67019660d088d
parent78087097b8b77aca355525ebaf98205eb7acad60
t1092: replace 'read-cache --table' with 'ls-files --sparse'

Now that 'git ls-files --sparse' exists, we can use it to verify the
state of a sparse index instead of 'test-tool read-cache table'. Replace
these usages within t1092-sparse-checkout-compatibility.sh.

The important changes are due to the different output format. We need to
use the '--stage' output to get a file mode and OID, but it also
includes a stage value and drops the object type. This leads to some
differences in how we handle looking for specific entries.

Some places where we previously looked for no 'tree' entries, we can
instead directly compare the output across the repository with a sparse
index and the one without.

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