Thread (1 message) 1 message, 1 author, 2024-08-19

Re: [PATCH v2] rebase -x: don't print "Executing:" msgs with --quiet

From: Junio C Hamano <hidden>
Date: 2024-08-19 20:17:38

Phillip Wood [off-list ref] writes:
On 18/08/2024 14:03, Matheus Tavares Bernardino wrote:
quoted
...
term_clean_line()", the correct approach would be to modify
"term_clean_line()" to return earlier "if (!isatty(1))". What do you
think?
On the face of it that sounds like a good idea but I haven't thought
too much about it. These messages are all going to stderr rather than
stdout. If we do go that way we'll need to adjust
launch_specified_editor() in editor.c to either suppress the hint or
terminate it with '\n' if stderr is not a terminal.
Right.

The true reason why I brought it up was because (1) it looked really
funny to avoid doing that term_clean_line() under "--verbose" as
well as under "--quiet" and the code should explain what reasoning
backs such decision but it did not, and (2) that unexplained funny
pattern repeated, which probably was a sign that it needed to become
a small helper function with descriptive name to encapsulate the
logic to decide when to call and when not to call the clean-line,
which as a bonus would give a central place for us to explain the
reason behind not cleaning the line under "--verbose" and the same
for "--quiet" (as I suspect that these two want to omit the call for
different reasons).

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help