From 1f651746cb1e6472823d790602b80cb6febd78c5 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 13 Sep 2021 13:50:43 -0400 Subject: [PATCH 1/2] p2000: explicitly turn off sparse index The full index test cases in p2000-sparse-operations.sh relied on the fact that the sparse index was off by default. When this default was flipped, the performance test was not altered. Do so now with the --no-sparse-index flag. Signed-off-by: Derrick Stolee --- t/perf/p2000-sparse-operations.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/perf/p2000-sparse-operations.sh b/t/perf/p2000-sparse-operations.sh index 597626276fbeae..44d8743a007db6 100755 --- a/t/perf/p2000-sparse-operations.sh +++ b/t/perf/p2000-sparse-operations.sh @@ -55,7 +55,7 @@ test_expect_success 'setup repo and indexes' ' git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v3 && ( cd full-v3 && - git sparse-checkout init --cone && + git sparse-checkout init --cone --no-sparse-index && git sparse-checkout set $SPARSE_CONE && git config index.version 3 && git update-index --index-version=3 && @@ -64,7 +64,7 @@ test_expect_success 'setup repo and indexes' ' git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v4 && ( cd full-v4 && - git sparse-checkout init --cone && + git sparse-checkout init --cone --no-sparse-index && git sparse-checkout set $SPARSE_CONE && git config index.version 4 && git update-index --index-version=4 && From e77632ac28136f0cd641b98901b1f0ef6ff6b5ae Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 13 Sep 2021 13:51:40 -0400 Subject: [PATCH 2/2] p2000: add new commands Signed-off-by: Derrick Stolee --- t/perf/p2000-sparse-operations.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/perf/p2000-sparse-operations.sh b/t/perf/p2000-sparse-operations.sh index 44d8743a007db6..b34d1f80d88e46 100755 --- a/t/perf/p2000-sparse-operations.sh +++ b/t/perf/p2000-sparse-operations.sh @@ -110,5 +110,11 @@ test_perf_on_all git add -A test_perf_on_all git add . test_perf_on_all git commit -a -m A test_perf_on_all git checkout -f - +test_perf_on_all git reset +test_perf_on_all git reset --hard +test_perf_on_all git update-index --add --remove +test_perf_on_all git diff +test_perf_on_all git diff --staged +test_perf_on_all git sparse-checkout reapply test_done