Skip to content

Commit ad6b5fe

Browse files
jacobvosmaergitster
authored andcommitted
t5544: clarify 'hook works with partial clone' test
Apply a few leftover improvements from the review of ad5df6b (upload-pack.c: fix filter spec quoting bug). 1. Instead of enumerating objects reachable from HEAD, enumerate all reachable objects, because HEAD has not special significance in this test. 2. Instead of relying on the knowledge that "? in rev-list output means partial clone", explicitly verify that there are no blobs with cat-file. Signed-off-by: Jacob Vosmaer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ad5df6b commit ad6b5fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t5544-pack-objects-hook.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ test_expect_success 'hook works with partial clone' '
6464
test_config_global uploadpack.packObjectsHook ./hook &&
6565
test_config_global uploadpack.allowFilter true &&
6666
git clone --bare --no-local --filter=blob:none . dst.git &&
67-
git -C dst.git rev-list --objects --missing=print HEAD >objects &&
68-
grep "^?" objects
67+
git -C dst.git rev-list --objects --missing=allow-any --no-object-names --all >objects &&
68+
git -C dst.git cat-file --batch-check="%(objecttype)" <objects >types &&
69+
! grep blob types
6970
'
7071

7172
test_done

0 commit comments

Comments
 (0)