git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 19, 2024, 20:17 UTC
Message-ID
<xmqqv7zwclns.fsf@gitster.g>
In-Reply-To
<08dc334a-e1d9-4aa1-945e-c543de549163@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 11 quoted lines
> On 18/08/2024 14:03, Matheus Tavares Bernardino wrote:
>> ...
>> 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.
Previous: Phillip WoodNext: Matheus Tavares Bernardino
Message 9 of 13 in “rebase -x: don't print "Executing:" msgs with --quiet”
  1. rebase -x: don't print "Executing:" msgs with --quietMatheus Tavares, Aug 16, 2024
  2. Elijah NewrenAug 16, 2024
  3. Patrick SteinhardtAug 16, 2024
  4. Junio C HamanoAug 16, 2024
  5. rebase -x: don't print "Executing:" msgs with --quietMatheus Tavares, Aug 16, 2024
  6. Junio C HamanoAug 17, 2024
  7. Matheus Tavares BernardinoAug 18, 2024
  8. Phillip WoodAug 19, 2024
  9. Junio C HamanoAug 19, 2024
  10. Matheus Tavares BernardinoAug 20, 2024
  11. Junio C HamanoAug 19, 2024
  12. rebase --exec: respect --quietMatheus Tavares, Aug 21, 2024
  13. Junio C HamanoAug 21, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.