From: Phillip Wood <phillip.wood123@gmail.com>
To: Matheus Tavares Bernardino <matheus.tavb@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de,
newren@gmail.com, ps@pks.im,
Lincoln Yuji <lincolnyuji@hotmail.com>,
Rodrigo Siqueira <siqueirajordao@riseup.net>
Subject: Re: [PATCH v2] rebase -x: don't print "Executing:" msgs with --quiet
Date: Mon, 19 Aug 2024 14:57:16 +0100 [thread overview]
Message-ID: <08dc334a-e1d9-4aa1-945e-c543de549163@gmail.com> (raw)
In-Reply-To: <CAGdrTFhZ6KeDPDUoCsV3h5myPuoYf7RR8eFdbFFXGrUGCdEkEw@mail.gmail.com>
Hi Matheus
On 18/08/2024 14:03, Matheus Tavares Bernardino wrote:
> On Sat, Aug 17, 2024 at 8:22 AM Junio C Hamano <gitster@pobox.com> wrote:
> The idea is that, when running in --quiet mode, we don't want to print
> anything, not even a line-cleaning char sequence.
>
> Nonetheless, since these are invisible chars (assuming we haven't
> printed anything to be "cleaned" before them), printing them doesn't
> actually make a difference to the user running rebase in the terminal,
> as they won't see the chars anyways.
>
> The actual issue is when piping/redirecting the rebase output, which
> will include these invisible chars... So perhaps, instead of modifying
> the sequencer.c to use "if (!opts->quiet && !opts->verbose)
> 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.
>> I actually would have expected that this message ...
>>
>>> fprintf(stderr, _("Stopped at %s... %.*s\n"),
>>> short_commit_name(r, commit), item->arg_len, arg);
>>
>> ... goes away when opts->quiet is in effect ;-).
>
> Sure, I can add that :) I was mostly focused on the "Executing ..."
> lines, so that's why I haven't seen/touched this one.
If we're going to suppress this we should probably suppress the message
about amending the commit that gets printed after this by
error_with_patch(). There are a number of other places that we ignore
"--quiet". stopped_at_head() prints a similar message to the one above
when we stop for a "break" command and currently ignores "--quiet".
Should the messages from "--autostash" be suppressed by "--quiet"? What
about when a commit is dropped because it is has become empty in
do_pick_commit()?
Thanks for working on this, it would be nice to have the sequencer
respect "--quiet" better.
Phillip
next prev parent reply other threads:[~2024-08-19 13:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 3:26 [PATCH] rebase -x: don't print "Executing:" msgs with --quiet Matheus Tavares
2024-08-16 6:20 ` Elijah Newren
2024-08-16 8:26 ` Patrick Steinhardt
2024-08-16 17:34 ` Junio C Hamano
2024-08-16 22:48 ` [PATCH v2] " Matheus Tavares
2024-08-17 11:22 ` Junio C Hamano
2024-08-18 13:03 ` Matheus Tavares Bernardino
2024-08-19 13:57 ` Phillip Wood [this message]
2024-08-19 20:17 ` Junio C Hamano
2024-08-20 22:23 ` Matheus Tavares Bernardino
2024-08-19 15:41 ` Junio C Hamano
2024-08-21 1:31 ` [PATCH v3] rebase --exec: respect --quiet Matheus Tavares
2024-08-21 16:00 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=08dc334a-e1d9-4aa1-945e-c543de549163@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=lincolnyuji@hotmail.com \
--cc=matheus.tavb@gmail.com \
--cc=newren@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=ps@pks.im \
--cc=siqueirajordao@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).