From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Peter Krefting <peter@softwolves.pp.se>,
git@vger.kernel.org, "Osipov,
Michael (IN IT IN)" <michael.osipov@innomotics.com>
Subject: Re: [PATCH v2] bisect: Honor log.date
Date: Tue, 2 Apr 2024 21:27:01 -0400 [thread overview]
Message-ID: <20240403012701.GC892394@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqmsqd9fse.fsf@gitster.g>
On Mon, Apr 01, 2024 at 10:03:13AM -0700, Junio C Hamano wrote:
> >> That made me realize, if "git show" runs things through a pager, wouldn't it
> >> then lose the "%s is the first %s commit\n" message printed by
> >> bisect_next_all() before calling the function to show the contents?
> >>
> >> Is that fixable?
> >
> > Good catch. IMHO we should disable the pager entirely by sticking
> > "--no-pager" at the front of the child argv. But then, maybe somebody
> > would like the output to be paged? I wouldn't.
>
> Hardcoded --no-pager is a good workaround. But if the output is
> long and needs paging, wouldn't we see what was shown before we
> spawned "less" on the screen when we quit it? Running
>
> $ (echo message here ; git log --help)
>
> and then saying 'q' to exit the pager leaves me "message" after that
> command line.
That depends on your "less" options and your terminal, I think. Aren't
there some combinations where the terminal deinit sequence clears the
screen? It has been a while since I've run into that, though, so I might
be misremembering.
At any rate, my concerns are more:
1. You wouldn't see it while the pager is active, so you are missing
some context.
2. If you don't use LESS=F, then it may be annoying to invoke the
pager at all.
-Peff
> > If we really wanted to keep the pager for git-show, I guess we'd need to
> > have it print the "%s is the first %s commit" message. The only way I
> > can think to do that is to pass it as a custom --format. But then we'd
> > need to additionally specify all of the usual "medium" format as a
> > custom format, too, which is quite ugly.
>
> ;-) Ugly but fun.
>
> I wonder how hard it is to add %(default-output) placeholder for the
> pretty machinery.
I have a dream that all of the pretty formats could be implemented in
terms of %-placeholders. But yeah, even without that, being able to do
"%(pretty:medium)" would be cool. "Pretty" cool, even. (Sorry, I could
not resist).
-Peff
next prev parent reply other threads:[~2024-04-03 1:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-30 23:10 [PATCH v2] bisect: Honor log.date Peter Krefting
2024-03-31 2:14 ` Junio C Hamano
2024-03-31 17:10 ` Peter Krefting
2024-03-31 22:58 ` Junio C Hamano
2024-04-01 2:32 ` Jeff King
2024-04-01 15:50 ` Peter Krefting
2024-04-01 16:32 ` Jeff King
2024-04-01 17:03 ` Junio C Hamano
2024-04-03 1:27 ` Jeff King [this message]
2024-04-16 11:01 ` Christian Couder
2024-04-16 15:42 ` Junio C Hamano
2024-04-16 19:53 ` Peter Krefting
2024-04-20 17:13 ` 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240403012701.GC892394@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=michael.osipov@innomotics.com \
--cc=peter@softwolves.pp.se \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).