diff options
| author | Justin Tobler <jltobler@gmail.com> | 2025-10-21 13:26:01 -0500 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-21 14:40:38 -0700 |
| commit | 16a93c03c7824a40b034a6ee1cb1c68c8ef48682 (patch) | |
| tree | 0728f109eef9dc77a523a14891f03fa757a7c3ce /t/t1901-repo-structure.sh | |
| parent | 17215675b5a2c2eab54b295a7e92d953af2e8779 (diff) | |
builtin/repo: add progress meter for structure stats
When using the structure subcommand for git-repo(1), evaluating a
repository may take some time depending on its shape. Add a progress
meter to provide feedback to the user about what is happening. The
progress meter is enabled by default when the command is executed from a
tty. It can also be explicitly enabled/disabled via the --[no-]progress
option.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1901-repo-structure.sh')
| -rwxr-xr-x | t/t1901-repo-structure.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t1901-repo-structure.sh b/t/t1901-repo-structure.sh index 14bd8aede5..36a71a144e 100755 --- a/t/t1901-repo-structure.sh +++ b/t/t1901-repo-structure.sh @@ -106,4 +106,24 @@ test_expect_success 'keyvalue and nul format' ' ) ' +test_expect_success 'progress meter option' ' + test_when_finished "rm -rf repo" && + git init repo && + ( + cd repo && + test_commit foo && + + GIT_PROGRESS_DELAY=0 git repo structure --progress >out 2>err && + + test_file_not_empty out && + test_grep "Counting references: 2, done." err && + test_grep "Counting objects: 3, done." err && + + GIT_PROGRESS_DELAY=0 git repo structure --no-progress >out 2>err && + + test_file_not_empty out && + test_line_count = 0 err + ) +' + test_done |
