|
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 |
@@ -708,6 +709,48 @@ test_expect_success 'push should not fetch new commit objects' ' |
708 | 709 | grep "^[?]$COMMIT" objects |
709 | 710 | ' |
710 | 711 |
|
| 712 | +test_expect_success 'setup for promisor.quiet tests' ' |
| 713 | + rm -rf server && |
| 714 | + test_create_repo server && |
| 715 | + test_commit -C server foo && |
| 716 | + git -C server rm foo.t && |
| 717 | + git -C server commit -m remove && |
| 718 | + git -C server config uploadpack.allowanysha1inwant 1 && |
| 719 | + git -C server config uploadpack.allowfilter 1 |
| 720 | +' |
| 721 | + |
| 722 | +test_expect_success TTY 'promisor.quiet=false shows progress messages' ' |
| 723 | + rm -rf repo && |
| 724 | + git clone --filter=blob:none "file://$(pwd)/server" repo && |
| 725 | + git -C repo config promisor.quiet "false" && |
| 726 | +
|
| 727 | + test_terminal git -C repo cat-file -p foo:foo.t 2>err && |
| 728 | +
|
| 729 | + # Ensure that progress messages are written |
| 730 | + grep "Receiving objects" err |
| 731 | +' |
| 732 | + |
| 733 | +test_expect_success TTY 'promisor.quiet=true does not show progress messages' ' |
| 734 | + rm -rf repo && |
| 735 | + git clone --filter=blob:none "file://$(pwd)/server" repo && |
| 736 | + git -C repo config promisor.quiet "true" && |
| 737 | +
|
| 738 | + test_terminal git -C repo cat-file -p foo:foo.t 2>err && |
| 739 | +
|
| 740 | + # Ensure that no progress messages are written |
| 741 | + ! grep "Receiving objects" err |
| 742 | +' |
| 743 | + |
| 744 | +test_expect_success TTY 'promisor.quiet=unconfigured shows progress messages' ' |
| 745 | + rm -rf repo && |
| 746 | + git clone --filter=blob:none "file://$(pwd)/server" repo && |
| 747 | +
|
| 748 | + test_terminal git -C repo cat-file -p foo:foo.t 2>err && |
| 749 | +
|
| 750 | + # Ensure that progress messages are written |
| 751 | + grep "Receiving objects" err |
| 752 | +' |
| 753 | + |
711 | 754 | . "$TEST_DIRECTORY"/lib-httpd.sh |
712 | 755 | start_httpd |
713 | 756 |
|
|
0 commit comments