Skip to content

Commit 5a7e634

Browse files
committed
Revert "commit-graph: use start_delayed_progress()"
This reverts commit 3bcd031, which was incomplete.
1 parent 3bcd031 commit 5a7e634

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

commit-graph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ static void compute_generation_numbers(struct write_commit_graph_context *ctx)
11031103
struct commit_list *list = NULL;
11041104

11051105
if (ctx->report_progress)
1106-
ctx->progress = start_delayed_progress(
1106+
ctx->progress = start_progress(
11071107
_("Computing commit graph generation numbers"),
11081108
ctx->commits.nr);
11091109
for (i = 0; i < ctx->commits.nr; i++) {

t/t5318-commit-graph.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ test_expect_success 'commit-graph write progress off for redirected stderr' '
130130
test_line_count = 0 err
131131
'
132132

133+
test_expect_success 'commit-graph write force progress on for stderr' '
134+
cd "$TRASH_DIRECTORY/full" &&
135+
git commit-graph write --progress 2>err &&
136+
test_file_not_empty err
137+
'
138+
133139
test_expect_success 'commit-graph write with the --no-progress option' '
134140
cd "$TRASH_DIRECTORY/full" &&
135141
git commit-graph write --no-progress 2>err &&

t/t6500-gc.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ test_expect_success 'auto gc with too many loose objects does not attempt to cre
102102
test_line_count = 2 new # There is one new pack and its .idx
103103
'
104104

105+
test_expect_success 'gc --no-quiet' '
106+
git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&
107+
test_must_be_empty stdout &&
108+
test_line_count = 1 stderr &&
109+
test_i18ngrep "Computing commit graph generation numbers" stderr
110+
'
111+
112+
test_expect_success TTY 'with TTY: gc --no-quiet' '
113+
test_terminal git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&
114+
test_must_be_empty stdout &&
115+
test_i18ngrep "Enumerating objects" stderr &&
116+
test_i18ngrep "Computing commit graph generation numbers" stderr
117+
'
118+
105119
test_expect_success 'gc --quiet' '
106120
git -c gc.writeCommitGraph=true gc --quiet >stdout 2>stderr &&
107121
test_must_be_empty stdout &&

0 commit comments

Comments
 (0)