git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Philip Yung <y5c4l3@proton.me>, Taylor Blau <me@ttaylorr.com>,
	Y5 via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] diff: setup pager only before diff contents truly ready
Date: Tue, 3 Dec 2024 16:24:41 -0500	[thread overview]
Message-ID: <20241203212441.GA1424493@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqo71tcovl.fsf@gitster.g>

On Tue, Dec 03, 2024 at 02:33:02PM +0900, Junio C Hamano wrote:

> >> It seems that this topic is waiting for a reroll?
> >
> > I think we could go either way. I outlined a few further possible steps,
> > but there is no need to hold up this first step. The only question is
> > whether or not to add a single test to show off and protect the
> > improvement.
> 
> Hmph, a few messages upthread
> <UZMh2lyzbLOgsf0PXfMnq6HnWVnCK3y36jY3IMKUykPi74ztNucf8bgywoeO0DdeApq31JDDGMZiEya99zAcI3l8y_zcVqiN8FpEnT1DRZU=@proton.me>
> (Ugh, why do some MUAs or mail providers use such an overly long
> message ID, Yuck) was where I got the impression that we were
> waiting for a reroll.

Yeah, I think Philip was offering to add some tests. Since he has been
quiet since, I do not have a strong opinion on whether we should just
take it as-is or let it go unless he comes back.

> I am not all that convinced that sprinkling setup_diff_pager() call
> all over the place is a good idea from longer-term maintainability's
> sake to begin with, by the way.  What problem are we really solving?
> Folks who run "git diff --no-such-option" see "behaviour inconsistency"?
> All I see is "error: invalid option: --invalid" followed by a help message,
> which is quite expected.

I think it is just about not starting the pager when there is no useful
output produced. Depending on your pager config, it is a little nicer if
we avoid it for a one-liner error. E.g., I do not use "-F", so "git diff
foo bar" drops me into the pager with a single error line.

-Peff

  reply	other threads:[~2024-12-03 21:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-19 20:39 [PATCH] diff: setup pager only before diff contents truly ready Y5 via GitGitGadget
2024-10-19 20:57 ` Kristoffer Haugsbakk
2024-10-21  0:17   ` Philip Yung
2024-10-19 21:19 ` Jeff King
2024-10-21  0:11   ` Philip Yung
2024-10-21 19:00     ` Jeff King
2024-10-21 19:38       ` Taylor Blau
2024-11-18  0:55         ` Junio C Hamano
2024-11-25 11:31           ` Jeff King
2024-12-03  5:33             ` Junio C Hamano
2024-12-03 21:24               ` Jeff King [this message]
2024-12-04  0:18                 ` 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=20241203212441.GA1424493@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=y5c4l3@proton.me \
    /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).