t5544: clarify 'hook works with partial clone' test

Apply a few leftover improvements from the review of ad5df6b782
(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 <jacob@gitlab.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jacob Vosmaer 2021-02-02 20:24:17 +01:00 коммит произвёл Junio C Hamano
Родитель ad5df6b782
Коммит ad6b5fefbd
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -64,8 +64,9 @@ test_expect_success 'hook works with partial clone' '
test_config_global uploadpack.packObjectsHook ./hook &&
test_config_global uploadpack.allowFilter true &&
git clone --bare --no-local --filter=blob:none . dst.git &&
git -C dst.git rev-list --objects --missing=print HEAD >objects &&
grep "^?" objects
git -C dst.git rev-list --objects --missing=allow-any --no-object-names --all >objects &&
git -C dst.git cat-file --batch-check="%(objecttype)" <objects >types &&
! grep blob types
'
test_done