Skip to content

Commit 234b880

Browse files
Merge pull request git-for-windows#432: sequencer: avoid progress when stderr is redirected
During a run of the Scalar functional tests, we hit a case where the inexact rename detection of a 'git cherry-pick' command slowed to the point of writing its delayed progress, failing the test because stderr differed from the control case. Showing progress like this when stderr is not a terminal is non-standard for Git, so inject an isatty(2) when initializing the progress option in sequencer.c. Unfortunately, there is no '--quiet' option in 'git cherry-pick' currently wired up. This could be considered in the future, and the isatty(2) could be moved to that position. This would also be needed for commands like 'git rebase', so we leave that for another time.
2 parents 7db06bd + 9c54d72 commit 234b880

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sequencer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ static int do_recursive_merge(struct repository *r,
627627
o.branch2 = next ? next_label : "(empty tree)";
628628
if (is_rebase_i(opts))
629629
o.buffer_output = 2;
630-
o.show_rename_progress = 1;
630+
o.show_rename_progress = isatty(2);
631631

632632
head_tree = parse_tree_indirect(head);
633633
next_tree = next ? get_commit_tree(next) : empty_tree(r);

0 commit comments

Comments
 (0)