]> git.ipfire.org Git - thirdparty/git.git/commitdiff
p2000: add test for 'git sparse-checkout [add|set]'
authorDerrick Stolee <derrickstolee@github.com>
Mon, 23 May 2022 13:48:45 +0000 (13:48 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 May 2022 18:08:22 +0000 (11:08 -0700)
The sparse-checkout builtin is almost completely integrated with the
sparse index, allowing the sparse-checkout boundary to be modified
without expanding a sparse index to a full one. Add a test to
p2000-sparse-operations.sh that adds a directory to the sparse-checkout
definition, then removes it. Using both operations is important to
ensure that the operation is doing the same work in each repetition as
well as leaving the test repo in a good state for later tests.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/perf/p2000-sparse-operations.sh

index 382716cfca909e82c0bc5bf04e3bb3726dc2f9f1..ce5cfac57145c240b6c7a494c5be9699a152e407 100755 (executable)
@@ -110,6 +110,7 @@ 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 sparse-checkout add f2/f3/f1 && git sparse-checkout set $SPARSE_CONE"
 test_perf_on_all git reset
 test_perf_on_all git reset --hard
 test_perf_on_all git reset -- does-not-exist