|
3 | 3 | test_description='partial clone' |
4 | 4 |
|
5 | 5 | . ./test-lib.sh |
| 6 | +. "$TEST_DIRECTORY"/lib-terminal.sh |
6 | 7 |
|
7 | 8 | # missing promisor objects cause repacks which write bitmaps to fail |
8 | 9 | GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=0 |
@@ -689,6 +690,48 @@ test_expect_success 'lazy-fetch when accessing object not in the_repository' ' |
689 | 690 | ! grep "[?]$FILE_HASH" out |
690 | 691 | ' |
691 | 692 |
|
| 693 | +test_expect_success 'setup for promisor.quiet tests' ' |
| 694 | + rm -rf server && |
| 695 | + test_create_repo server && |
| 696 | + test_commit -C server foo && |
| 697 | + git -C server rm foo.t && |
| 698 | + git -C server commit -m remove && |
| 699 | + git -C server config uploadpack.allowanysha1inwant 1 && |
| 700 | + git -C server config uploadpack.allowfilter 1 |
| 701 | +' |
| 702 | + |
| 703 | +test_expect_success TTY 'promisor.quiet=false shows progress messages' ' |
| 704 | + rm -rf repo && |
| 705 | + git clone --filter=blob:none "file://$(pwd)/server" repo && |
| 706 | + git -C repo config promisor.quiet "false" && |
| 707 | +
|
| 708 | + test_terminal git -C repo cat-file -p foo:foo.t 2>err && |
| 709 | +
|
| 710 | + # Ensure that progress messages are written |
| 711 | + grep "Receiving objects" err |
| 712 | +' |
| 713 | + |
| 714 | +test_expect_success TTY 'promisor.quiet=true does not show progress messages' ' |
| 715 | + rm -rf repo && |
| 716 | + git clone --filter=blob:none "file://$(pwd)/server" repo && |
| 717 | + git -C repo config promisor.quiet "true" && |
| 718 | +
|
| 719 | + test_terminal git -C repo cat-file -p foo:foo.t 2>err && |
| 720 | +
|
| 721 | + # Ensure that no progress messages are written |
| 722 | + ! grep "Receiving objects" err |
| 723 | +' |
| 724 | + |
| 725 | +test_expect_success TTY 'promisor.quiet=unconfigured shows progress messages' ' |
| 726 | + rm -rf repo && |
| 727 | + git clone --filter=blob:none "file://$(pwd)/server" repo && |
| 728 | +
|
| 729 | + test_terminal git -C repo cat-file -p foo:foo.t 2>err && |
| 730 | +
|
| 731 | + # Ensure that progress messages are written |
| 732 | + grep "Receiving objects" err |
| 733 | +' |
| 734 | + |
692 | 735 | . "$TEST_DIRECTORY"/lib-httpd.sh |
693 | 736 | start_httpd |
694 | 737 |
|
|
0 commit comments