Skip to content

Commit 1df7b6f

Browse files
derrickstoleedscho
authored andcommitted
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. Reported-by: Victoria Dye <vdye@github.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
1 parent 2d2d322 commit 1df7b6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: sequencer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ static int do_recursive_merge(struct repository *r,
770770
o.branch2 = next ? next_label : "(empty tree)";
771771
if (is_rebase_i(opts))
772772
o.buffer_output = 2;
773-
o.show_rename_progress = 1;
773+
o.show_rename_progress = isatty(2);
774774

775775
head_tree = parse_tree_indirect(head);
776776
if (!head_tree)

0 commit comments

Comments
 (0)