3 test_description
='partial clone'
7 # missing promisor objects cause repacks which write bitmaps to fail
8 GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP
=0
11 rm $1/.git
/objects
/$
(echo $2 |
sed -e 's|^..|&/|')
14 pack_as_from_promisor
() {
15 HASH
=$
(git
-C repo pack-objects .git
/objects
/pack
/pack
) &&
16 >repo
/.git
/objects
/pack
/pack-
$HASH.promisor
&&
20 promise_and_delete
() {
21 HASH
=$
(git
-C repo rev-parse
"$1") &&
22 git
-C repo tag
-a -m message my_annotated_tag
"$HASH" &&
23 git
-C repo rev-parse my_annotated_tag | pack_as_from_promisor
&&
24 # tag -d prints a message to stdout, so redirect it
25 git
-C repo tag
-d my_annotated_tag
>/dev
/null
&&
26 delete_object repo
"$HASH"
29 test_expect_success
'extensions.partialclone without filter' '
30 test_create_repo server &&
31 git clone --filter="blob:none" "file://$(pwd)/server" client &&
32 git -C client config --unset remote.origin.partialclonefilter &&
33 git -C client fetch origin
36 test_expect_success
'convert shallow clone to partial clone' '
37 rm -fr server client &&
38 test_create_repo server &&
39 test_commit -C server my_commit 1 &&
40 test_commit -C server my_commit2 1 &&
41 git clone --depth=1 "file://$(pwd)/server" client &&
42 git -C client fetch --unshallow --filter="blob:none" &&
43 test_cmp_config -C client true remote.origin.promisor &&
44 test_cmp_config -C client blob:none remote.origin.partialclonefilter &&
45 test_cmp_config -C client 1 core.repositoryformatversion
48 test_expect_success SHA1
'convert to partial clone with noop extension' '
49 rm -fr server client &&
50 test_create_repo server &&
51 test_commit -C server my_commit 1 &&
52 test_commit -C server my_commit2 1 &&
53 git clone --depth=1 "file://$(pwd)/server" client &&
54 test_cmp_config -C client 0 core.repositoryformatversion &&
55 git -C client config extensions.noop true &&
56 git -C client fetch --unshallow --filter="blob:none"
59 test_expect_success SHA1
'converting to partial clone fails with unrecognized extension' '
60 rm -fr server client &&
61 test_create_repo server &&
62 test_commit -C server my_commit 1 &&
63 test_commit -C server my_commit2 1 &&
64 git clone --depth=1 "file://$(pwd)/server" client &&
65 test_cmp_config -C client 0 core.repositoryformatversion &&
66 git -C client config extensions.nonsense true &&
67 test_must_fail git -C client fetch --unshallow --filter="blob:none"
70 test_expect_success
'missing reflog object, but promised by a commit, passes fsck' '
72 test_create_repo repo &&
73 test_commit -C repo my_commit &&
75 A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
76 C=$(git -C repo commit-tree -m c -p $A HEAD^{tree}) &&
78 # Reference $A only from reflog, and delete it
79 git -C repo branch my_branch "$A" &&
80 git -C repo branch -f my_branch my_commit &&
81 delete_object repo "$A" &&
83 # State that we got $C, which refers to $A, from promisor
84 printf "$C\n" | pack_as_from_promisor &&
87 test_must_fail git -C repo fsck &&
89 # But with the extension, it succeeds
90 git -C repo config core.repositoryformatversion 1 &&
91 git -C repo config extensions.partialclone "arbitrary string" &&
95 test_expect_success
'missing reflog object, but promised by a tag, passes fsck' '
97 test_create_repo repo &&
98 test_commit -C repo my_commit &&
100 A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
101 git -C repo tag -a -m d my_tag_name $A &&
102 T=$(git -C repo rev-parse my_tag_name) &&
103 git -C repo tag -d my_tag_name &&
105 # Reference $A only from reflog, and delete it
106 git -C repo branch my_branch "$A" &&
107 git -C repo branch -f my_branch my_commit &&
108 delete_object repo "$A" &&
110 # State that we got $T, which refers to $A, from promisor
111 printf "$T\n" | pack_as_from_promisor &&
113 git -C repo config core.repositoryformatversion 1 &&
114 git -C repo config extensions.partialclone "arbitrary string" &&
118 test_expect_success
'missing reflog object alone fails fsck, even with extension set' '
120 test_create_repo repo &&
121 test_commit -C repo my_commit &&
123 A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
124 B=$(git -C repo commit-tree -m b HEAD^{tree}) &&
126 # Reference $A only from reflog, and delete it
127 git -C repo branch my_branch "$A" &&
128 git -C repo branch -f my_branch my_commit &&
129 delete_object repo "$A" &&
131 git -C repo config core.repositoryformatversion 1 &&
132 git -C repo config extensions.partialclone "arbitrary string" &&
133 test_must_fail git -C repo fsck
136 test_expect_success
'missing ref object, but promised, passes fsck' '
138 test_create_repo repo &&
139 test_commit -C repo my_commit &&
141 A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
143 # Reference $A only from ref
144 git -C repo branch my_branch "$A" &&
145 promise_and_delete "$A" &&
147 git -C repo config core.repositoryformatversion 1 &&
148 git -C repo config extensions.partialclone "arbitrary string" &&
152 test_expect_success
'missing object, but promised, passes fsck' '
154 test_create_repo repo &&
155 test_commit -C repo 1 &&
156 test_commit -C repo 2 &&
157 test_commit -C repo 3 &&
158 git -C repo tag -a annotated_tag -m "annotated tag" &&
160 C=$(git -C repo rev-parse 1) &&
161 T=$(git -C repo rev-parse 2^{tree}) &&
162 B=$(git hash-object repo/3.t) &&
163 AT=$(git -C repo rev-parse annotated_tag) &&
165 promise_and_delete "$C" &&
166 promise_and_delete "$T" &&
167 promise_and_delete "$B" &&
168 promise_and_delete "$AT" &&
170 git -C repo config core.repositoryformatversion 1 &&
171 git -C repo config extensions.partialclone "arbitrary string" &&
175 test_expect_success
'missing CLI object, but promised, passes fsck' '
177 test_create_repo repo &&
178 test_commit -C repo my_commit &&
180 A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
181 promise_and_delete "$A" &&
183 git -C repo config core.repositoryformatversion 1 &&
184 git -C repo config extensions.partialclone "arbitrary string" &&
185 git -C repo fsck "$A"
188 test_expect_success
'fetching of missing objects' '
190 test_create_repo server &&
191 test_commit -C server foo &&
192 git -C server repack -a -d --write-bitmap-index &&
194 git clone "file://$(pwd)/server" repo &&
195 HASH=$(git -C repo rev-parse foo) &&
196 rm -rf repo/.git/objects/* &&
198 git -C repo config core.repositoryformatversion 1 &&
199 git -C repo config extensions.partialclone "origin" &&
200 git -C repo cat-file -p "$HASH" 2>err &&
202 # Ensure that no spurious FETCH_HEAD messages are written
203 ! grep FETCH_HEAD err &&
205 # Ensure that the .promisor file is written, and check that its
206 # associated packfile contains the object
207 ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
208 test_line_count = 1 promisorlist &&
209 IDX=$(sed "s/promisor$/idx/" promisorlist) &&
210 git verify-pack --verbose "$IDX" >out &&
214 test_expect_success
'fetching of missing objects works with ref-in-want enabled' '
215 # ref-in-want requires protocol version 2
216 git -C server config protocol.version 2 &&
217 git -C server config uploadpack.allowrefinwant 1 &&
218 git -C repo config protocol.version 2 &&
220 rm -rf repo/.git/objects/* &&
222 GIT_TRACE_PACKET="$(pwd)/trace" git -C repo cat-file -p "$HASH" &&
223 grep "fetch< fetch=.*ref-in-want" trace
226 test_expect_success
'fetching of missing objects from another promisor remote' '
227 git clone "file://$(pwd)/server" server2 &&
228 test_commit -C server2 bar &&
229 git -C server2 repack -a -d --write-bitmap-index &&
230 HASH2=$(git -C server2 rev-parse bar) &&
232 git -C repo remote add server2 "file://$(pwd)/server2" &&
233 git -C repo config remote.server2.promisor true &&
234 git -C repo cat-file -p "$HASH2" &&
236 git -C repo fetch server2 &&
237 rm -rf repo/.git/objects/* &&
238 git -C repo cat-file -p "$HASH2" &&
240 # Ensure that the .promisor file is written, and check that its
241 # associated packfile contains the object
242 ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
243 test_line_count = 1 promisorlist &&
244 IDX=$(sed "s/promisor$/idx/" promisorlist) &&
245 git verify-pack --verbose "$IDX" >out &&
249 test_expect_success
'fetching of missing objects configures a promisor remote' '
250 git clone "file://$(pwd)/server" server3 &&
251 test_commit -C server3 baz &&
252 git -C server3 repack -a -d --write-bitmap-index &&
253 HASH3=$(git -C server3 rev-parse baz) &&
254 git -C server3 config uploadpack.allowfilter 1 &&
256 rm repo/.git/objects/pack/pack-*.promisor &&
258 git -C repo remote add server3 "file://$(pwd)/server3" &&
259 git -C repo fetch --filter="blob:none" server3 $HASH3 &&
261 test_cmp_config -C repo true remote.server3.promisor &&
263 # Ensure that the .promisor file is written, and check that its
264 # associated packfile contains the object
265 ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
266 test_line_count = 1 promisorlist &&
267 IDX=$(sed "s/promisor$/idx/" promisorlist) &&
268 git verify-pack --verbose "$IDX" >out &&
272 test_expect_success
'fetching of missing blobs works' '
273 rm -rf server server2 repo &&
274 rm -rf server server3 repo &&
275 test_create_repo server &&
276 test_commit -C server foo &&
277 git -C server repack -a -d --write-bitmap-index &&
279 git clone "file://$(pwd)/server" repo &&
280 git hash-object repo/foo.t >blobhash &&
281 rm -rf repo/.git/objects/* &&
283 git -C server config uploadpack.allowanysha1inwant 1 &&
284 git -C server config uploadpack.allowfilter 1 &&
285 git -C repo config core.repositoryformatversion 1 &&
286 git -C repo config extensions.partialclone "origin" &&
288 git -C repo cat-file -p $(cat blobhash)
291 test_expect_success
'fetching of missing trees does not fetch blobs' '
292 rm -rf server repo &&
293 test_create_repo server &&
294 test_commit -C server foo &&
295 git -C server repack -a -d --write-bitmap-index &&
297 git clone "file://$(pwd)/server" repo &&
298 git -C repo rev-parse foo^{tree} >treehash &&
299 git hash-object repo/foo.t >blobhash &&
300 rm -rf repo/.git/objects/* &&
302 git -C server config uploadpack.allowanysha1inwant 1 &&
303 git -C server config uploadpack.allowfilter 1 &&
304 git -C repo config core.repositoryformatversion 1 &&
305 git -C repo config extensions.partialclone "origin" &&
306 git -C repo cat-file -p $(cat treehash) &&
308 # Ensure that the tree, but not the blob, is fetched
309 git -C repo rev-list --objects --missing=print $(cat treehash) >objects &&
310 grep "^$(cat treehash)" objects &&
311 grep "^[?]$(cat blobhash)" objects
314 test_expect_success
'rev-list stops traversal at missing and promised commit' '
316 test_create_repo repo &&
317 test_commit -C repo foo &&
318 test_commit -C repo bar &&
320 FOO=$(git -C repo rev-parse foo) &&
321 promise_and_delete "$FOO" &&
323 git -C repo config core.repositoryformatversion 1 &&
324 git -C repo config extensions.partialclone "arbitrary string" &&
325 GIT_TEST_COMMIT_GRAPH=0 git -C repo -c core.commitGraph=false rev-list --exclude-promisor-objects --objects bar >out &&
326 grep $(git -C repo rev-parse bar) out &&
330 test_expect_success
'missing tree objects with --missing=allow-promisor and --exclude-promisor-objects' '
332 test_create_repo repo &&
333 test_commit -C repo foo &&
334 test_commit -C repo bar &&
335 test_commit -C repo baz &&
337 promise_and_delete $(git -C repo rev-parse bar^{tree}) &&
338 promise_and_delete $(git -C repo rev-parse foo^{tree}) &&
340 git -C repo config core.repositoryformatversion 1 &&
341 git -C repo config extensions.partialclone "arbitrary string" &&
343 git -C repo rev-list --missing=allow-promisor --objects HEAD >objs 2>rev_list_err &&
344 test_must_be_empty rev_list_err &&
345 # 3 commits, 3 blobs, and 1 tree
346 test_line_count = 7 objs &&
348 # Do the same for --exclude-promisor-objects, but with all trees gone.
349 promise_and_delete $(git -C repo rev-parse baz^{tree}) &&
350 git -C repo rev-list --exclude-promisor-objects --objects HEAD >objs 2>rev_list_err &&
351 test_must_be_empty rev_list_err &&
352 # 3 commits, no blobs or trees
353 test_line_count = 3 objs
356 test_expect_success
'missing non-root tree object and rev-list' '
358 test_create_repo repo &&
360 echo foo >repo/dir/foo &&
361 git -C repo add dir/foo &&
362 git -C repo commit -m "commit dir/foo" &&
364 promise_and_delete $(git -C repo rev-parse HEAD:dir) &&
366 git -C repo config core.repositoryformatversion 1 &&
367 git -C repo config extensions.partialclone "arbitrary string" &&
369 git -C repo rev-list --missing=allow-any --objects HEAD >objs 2>rev_list_err &&
370 test_must_be_empty rev_list_err &&
371 # 1 commit and 1 tree
372 test_line_count = 2 objs
375 test_expect_success
'rev-list stops traversal at missing and promised tree' '
377 test_create_repo repo &&
378 test_commit -C repo foo &&
380 echo something >repo/a_dir/something &&
381 git -C repo add a_dir/something &&
382 git -C repo commit -m bar &&
384 # foo^{tree} (tree referenced from commit)
385 TREE=$(git -C repo rev-parse foo^{tree}) &&
387 # a tree referenced by HEAD^{tree} (tree referenced from tree)
388 TREE2=$(git -C repo ls-tree HEAD^{tree} | grep " tree " | head -1 | cut -b13-52) &&
390 promise_and_delete "$TREE" &&
391 promise_and_delete "$TREE2" &&
393 git -C repo config core.repositoryformatversion 1 &&
394 git -C repo config extensions.partialclone "arbitrary string" &&
395 git -C repo rev-list --exclude-promisor-objects --objects HEAD >out &&
396 grep $(git -C repo rev-parse foo) out &&
398 grep $(git -C repo rev-parse HEAD) out &&
402 test_expect_success
'rev-list stops traversal at missing and promised blob' '
404 test_create_repo repo &&
405 echo something >repo/something &&
406 git -C repo add something &&
407 git -C repo commit -m foo &&
409 BLOB=$(git -C repo hash-object -w something) &&
410 promise_and_delete "$BLOB" &&
412 git -C repo config core.repositoryformatversion 1 &&
413 git -C repo config extensions.partialclone "arbitrary string" &&
414 git -C repo rev-list --exclude-promisor-objects --objects HEAD >out &&
415 grep $(git -C repo rev-parse HEAD) out &&
419 test_expect_success
'rev-list stops traversal at promisor commit, tree, and blob' '
421 test_create_repo repo &&
422 test_commit -C repo foo &&
423 test_commit -C repo bar &&
424 test_commit -C repo baz &&
426 COMMIT=$(git -C repo rev-parse foo) &&
427 TREE=$(git -C repo rev-parse bar^{tree}) &&
428 BLOB=$(git hash-object repo/baz.t) &&
429 printf "%s\n%s\n%s\n" $COMMIT $TREE $BLOB | pack_as_from_promisor &&
431 git -C repo config core.repositoryformatversion 1 &&
432 git -C repo config extensions.partialclone "arbitrary string" &&
433 git -C repo rev-list --exclude-promisor-objects --objects HEAD >out &&
434 ! grep $COMMIT out &&
437 grep $(git -C repo rev-parse bar) out # sanity check that some walking was done
440 test_expect_success
'rev-list dies for missing objects on cmd line' '
442 test_create_repo repo &&
443 test_commit -C repo foo &&
444 test_commit -C repo bar &&
445 test_commit -C repo baz &&
447 COMMIT=$(git -C repo rev-parse foo) &&
448 TREE=$(git -C repo rev-parse bar^{tree}) &&
449 BLOB=$(git hash-object repo/baz.t) &&
451 promise_and_delete $COMMIT &&
452 promise_and_delete $TREE &&
453 promise_and_delete $BLOB &&
455 git -C repo config core.repositoryformatversion 1 &&
456 git -C repo config extensions.partialclone "arbitrary string" &&
458 for OBJ in "$COMMIT" "$TREE" "$BLOB"; do
459 test_must_fail git -C repo rev-list --objects \
460 --exclude-promisor-objects "$OBJ" &&
461 test_must_fail git -C repo rev-list --objects-edge-aggressive \
462 --exclude-promisor-objects "$OBJ" &&
464 # Do not die or crash when --ignore-missing is passed.
465 git -C repo rev-list --ignore-missing --objects \
466 --exclude-promisor-objects "$OBJ" &&
467 git -C repo rev-list --ignore-missing --objects-edge-aggressive \
468 --exclude-promisor-objects "$OBJ"
472 test_expect_success
'single promisor remote can be re-initialized gracefully' '
473 # ensure one promisor is in the promisors list
475 test_create_repo repo &&
476 test_create_repo other &&
477 git -C repo remote add foo "file://$(pwd)/other" &&
478 git -C repo config remote.foo.promisor true &&
479 git -C repo config extensions.partialclone foo &&
481 # reinitialize the promisors list
482 git -C repo fetch --filter=blob:none foo
485 test_expect_success
'gc repacks promisor objects separately from non-promisor objects' '
487 test_create_repo repo &&
488 test_commit -C repo one &&
489 test_commit -C repo two &&
491 TREE_ONE=$(git -C repo rev-parse one^{tree}) &&
492 printf "$TREE_ONE\n" | pack_as_from_promisor &&
493 TREE_TWO=$(git -C repo rev-parse two^{tree}) &&
494 printf "$TREE_TWO\n" | pack_as_from_promisor &&
496 git -C repo config core.repositoryformatversion 1 &&
497 git -C repo config extensions.partialclone "arbitrary string" &&
500 # Ensure that exactly one promisor packfile exists, and that it
501 # contains the trees but not the commits
502 ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
503 test_line_count = 1 promisorlist &&
504 PROMISOR_PACKFILE=$(sed "s/.promisor/.pack/" <promisorlist) &&
505 git verify-pack $PROMISOR_PACKFILE -v >out &&
506 grep "$TREE_ONE" out &&
507 grep "$TREE_TWO" out &&
508 ! grep "$(git -C repo rev-parse one)" out &&
509 ! grep "$(git -C repo rev-parse two)" out &&
511 # Remove the promisor packfile and associated files
512 rm $(sed "s/.promisor//" <promisorlist).* &&
514 # Ensure that the single other pack contains the commits, but not the
516 ls repo/.git/objects/pack/pack-*.pack >packlist &&
517 test_line_count = 1 packlist &&
518 git verify-pack repo/.git/objects/pack/pack-*.pack -v >out &&
519 grep "$(git -C repo rev-parse one)" out &&
520 grep "$(git -C repo rev-parse two)" out &&
521 ! grep "$TREE_ONE" out &&
522 ! grep "$TREE_TWO" out
525 test_expect_success
'gc does not repack promisor objects if there are none' '
527 test_create_repo repo &&
528 test_commit -C repo one &&
530 git -C repo config core.repositoryformatversion 1 &&
531 git -C repo config extensions.partialclone "arbitrary string" &&
534 # Ensure that only one pack exists
535 ls repo/.git/objects/pack/pack-*.pack >packlist &&
536 test_line_count = 1 packlist
539 repack_and_check
() {
542 if test x
"$1" = "x--must-fail"
545 test_must_fail git
-C repo2 repack
$1 -d
547 git
-C repo2 repack
$1 -d
551 git
-C repo2 cat-file
-e $2 &&
552 git
-C repo2 cat-file
-e $3
555 test_expect_success
'repack -d does not irreversibly delete promisor objects' '
557 test_create_repo repo &&
558 git -C repo config core.repositoryformatversion 1 &&
559 git -C repo config extensions.partialclone "arbitrary string" &&
561 git -C repo commit --allow-empty -m one &&
562 git -C repo commit --allow-empty -m two &&
563 git -C repo commit --allow-empty -m three &&
564 git -C repo commit --allow-empty -m four &&
565 ONE=$(git -C repo rev-parse HEAD^^^) &&
566 TWO=$(git -C repo rev-parse HEAD^^) &&
567 THREE=$(git -C repo rev-parse HEAD^) &&
569 printf "$TWO\n" | pack_as_from_promisor &&
570 printf "$THREE\n" | pack_as_from_promisor &&
571 delete_object repo "$ONE" &&
573 repack_and_check --must-fail -ab "$TWO" "$THREE" &&
574 repack_and_check -a "$TWO" "$THREE" &&
575 repack_and_check -A "$TWO" "$THREE" &&
576 repack_and_check -l "$TWO" "$THREE"
579 test_expect_success
'gc stops traversal when a missing but promised object is reached' '
581 test_create_repo repo &&
582 test_commit -C repo my_commit &&
584 TREE_HASH=$(git -C repo rev-parse HEAD^{tree}) &&
585 HASH=$(promise_and_delete $TREE_HASH) &&
587 git -C repo config core.repositoryformatversion 1 &&
588 git -C repo config extensions.partialclone "arbitrary string" &&
591 # Ensure that the promisor packfile still exists, and remove it
592 test -e repo/.git/objects/pack/pack-$HASH.pack &&
593 rm repo/.git/objects/pack/pack-$HASH.* &&
595 # Ensure that the single other pack contains the commit, but not the tree
596 ls repo/.git/objects/pack/pack-*.pack >packlist &&
597 test_line_count = 1 packlist &&
598 git verify-pack repo/.git/objects/pack/pack-*.pack -v >out &&
599 grep "$(git -C repo rev-parse HEAD)" out &&
600 ! grep "$TREE_HASH" out
603 test_expect_success
'do not fetch when checking existence of tree we construct ourselves' '
605 test_create_repo repo &&
606 test_commit -C repo base &&
607 test_commit -C repo side1 &&
608 git -C repo checkout base &&
609 test_commit -C repo side2 &&
611 git -C repo config core.repositoryformatversion 1 &&
612 git -C repo config extensions.partialclone "arbitrary string" &&
614 git -C repo cherry-pick side1
617 test_expect_success
'lazy-fetch when accessing object not in the_repository' '
618 rm -rf full partial.git &&
619 test_create_repo full &&
620 test_commit -C full create-a-file file.txt &&
622 test_config -C full uploadpack.allowfilter 1 &&
623 test_config -C full uploadpack.allowanysha1inwant 1 &&
624 git clone --filter=blob:none --bare "file://$(pwd)/full" partial.git &&
625 FILE_HASH=$(git -C full rev-parse HEAD:file.txt) &&
627 # Sanity check that the file is missing
628 git -C partial.git rev-list --objects --missing=print HEAD >out &&
629 grep "[?]$FILE_HASH" out &&
631 git -C full cat-file -s "$FILE_HASH" >expect &&
632 test-tool partial-clone object-info partial.git "$FILE_HASH" >actual &&
633 test_cmp expect actual &&
635 # Sanity check that the file is now present
636 git -C partial.git rev-list --objects --missing=print HEAD >out &&
637 ! grep "[?]$FILE_HASH" out
640 .
"$TEST_DIRECTORY"/lib-httpd.sh
643 test_expect_success
'fetching of missing objects from an HTTP server' '
645 SERVER="$HTTPD_DOCUMENT_ROOT_PATH/server" &&
646 test_create_repo "$SERVER" &&
647 test_commit -C "$SERVER" foo &&
648 git -C "$SERVER" repack -a -d --write-bitmap-index &&
650 git clone $HTTPD_URL/smart/server repo &&
651 HASH=$(git -C repo rev-parse foo) &&
652 rm -rf repo/.git/objects/* &&
654 git -C repo config core.repositoryformatversion 1 &&
655 git -C repo config extensions.partialclone "origin" &&
656 git -C repo cat-file -p "$HASH" &&
658 # Ensure that the .promisor file is written, and check that its
659 # associated packfile contains the object
660 ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
661 test_line_count = 1 promisorlist &&
662 IDX=$(sed "s/promisor$/idx/" promisorlist) &&
663 git verify-pack --verbose "$IDX" >out &&
667 # DO NOT add non-httpd-specific tests here, because the last part of this
668 # test script is only executed when httpd is available and enabled.