Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2021-12-22 17:20:55 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-22 22:42:40 +0300
commitc2a2940510579bad9f5c63797542c47f14e8a2da (patch)
tree2ff3f8d76c43d04ef561bf52704e58e032ce1fca /t/t3705-add-sparse-checkout.sh
parent3a9a6ac5d9df68152795e66acba02afd928bf705 (diff)
t1091/t3705: remove 'test-tool read-cache --table'
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 t1091-sparse-checkout-builtin.sh and t3705-add-sparse-checkout.sh. The important changes are due to the different output format. In t3705, 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. In t1091, the test focuses on enabling the sparse index, so we do not need the --stage flag to demonstrate how the index changes, and instead can use a diff. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3705-add-sparse-checkout.sh')
-rwxr-xr-xt/t3705-add-sparse-checkout.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t3705-add-sparse-checkout.sh b/t/t3705-add-sparse-checkout.sh
index f3143c9290..81f3384eee 100755
--- a/t/t3705-add-sparse-checkout.sh
+++ b/t/t3705-add-sparse-checkout.sh
@@ -181,13 +181,13 @@ test_expect_success 'git add fails outside of sparse-checkout definition' '
# Avoid munging CRLFs to avoid an error message
git -c core.autocrlf=input add --sparse sparse_entry 2>stderr &&
test_must_be_empty stderr &&
- test-tool read-cache --table >actual &&
- grep "^100644 blob.*sparse_entry\$" actual &&
+ git ls-files --stage >actual &&
+ grep "^100644 .*sparse_entry\$" actual &&
git add --sparse --chmod=+x sparse_entry 2>stderr &&
test_must_be_empty stderr &&
- test-tool read-cache --table >actual &&
- grep "^100755 blob.*sparse_entry\$" actual &&
+ git ls-files --stage >actual &&
+ grep "^100755 .*sparse_entry\$" actual &&
git reset &&