]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5300: move --window clamp test next to unclamped
authorJonathan Tan <jonathantanmy@google.com>
Fri, 1 Nov 2024 20:11:47 +0000 (13:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 2 Nov 2024 11:08:21 +0000 (04:08 -0700)
A subsequent commit will change the behavior of "git index-pack
--promisor", which is exercised in "build pack index for an existing
pack", causing the unclamped and clamped versions of the --window
test to exhibit different behavior. Move the clamp test closer to the
unclamped test that it references.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5300-pack-object.sh

index 3b9dae331a5ea9dc0bed8a2ee64d5350341dcd06..aff164ddf8ec79c23d0b230daa38e3892b02a233 100755 (executable)
@@ -156,6 +156,11 @@ test_expect_success 'pack without delta' '
        check_deltas stderr = 0
 '
 
+test_expect_success 'negative window clamps to 0' '
+       git pack-objects --progress --window=-1 neg-window <obj-list 2>stderr &&
+       check_deltas stderr = 0
+'
+
 test_expect_success 'pack-objects with bogus arguments' '
        test_must_fail git pack-objects --window=0 test-1 blah blah <obj-list
 '
@@ -630,11 +635,6 @@ test_expect_success 'prefetch objects' '
        test_line_count = 1 donelines
 '
 
-test_expect_success 'negative window clamps to 0' '
-       git pack-objects --progress --window=-1 neg-window <obj-list 2>stderr &&
-       check_deltas stderr = 0
-'
-
 for hash in sha1 sha256
 do
        test_expect_success "verify-pack with $hash packfile" '