From 2d657ab95fd5be5ebeee43fecec3d7cd94fdd2e4 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Fri, 20 Mar 2020 12:38:10 +0000 Subject: pack-objects: flip the use of GIT_TEST_PACK_SPARSE The environment variable GIT_TEST_PACK_SPARSE was previously used to allow testing the --sparse option for "git pack-objects" in the test suite. This allowed interesting cases of "git push" to also test this algorithm. Since pack.useSparse is now true by default, we do not need this variable to _enable_ the --sparse option, but instead to _disable_ it. This flips how we work with the variable a bit. When checking for the variable, default to a value of -1 for "unset". If unset, then take the default from the repo settings, which is currently 1. Then, the --[no-]sparse command-line option will override either of these settings. Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- t/t5322-pack-objects-sparse.sh | 1 + 1 file changed, 1 insertion(+) (limited to 't/t5322-pack-objects-sparse.sh') diff --git a/t/t5322-pack-objects-sparse.sh b/t/t5322-pack-objects-sparse.sh index 6e5d6bdb0a..a581eaf529 100755 --- a/t/t5322-pack-objects-sparse.sh +++ b/t/t5322-pack-objects-sparse.sh @@ -107,6 +107,7 @@ test_expect_success 'non-sparse pack-objects' ' # --sparse is enabled by default by pack.useSparse test_expect_success 'sparse pack-objects' ' + GIT_TEST_PACK_SPARSE=-1 && git rev-parse \ topic1 \ topic1^{tree} \ -- cgit v1.3