From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Beat Bolli <dev+git@drbeat.li>, Denton Liu <liu.denton@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] pretty: allow to override the built-in formats
Date: Tue, 08 Sep 2020 11:12:11 -0700 [thread overview]
Message-ID: <xmqqzh60xhms.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200908135303.GA2448968@coredump.intra.peff.net> (Jeff King's message of "Tue, 8 Sep 2020 09:53:03 -0400")
Jeff King <peff@peff.net> writes:
> You could accomplish something similar by having gitk look up
> pretty.userReference, and defaulting to something sensible if it's not
> defined. For a big script like gitk that's not too much of an
> imposition. But it's awfully convenient to be able to just say
> --format=reference in any script and get the user's preferred format.
Or --format=userReference in any script, and then allow it to fall
back to pretty.reference that is otherwise ignored? Ah, that indeed
is what you suggested with --format=loose:reference already.
> So of any of the formats, it seems like the most likely candidate for
> such a feature (setting "pretty.raw" would be a pretty big foot-gun, for
> instance). I don't like the inconsistency it introduces between formats,
> though.
Yes, the inconsistency was what primarily disturbed me.
> Here's a slightly different proposal. I'm not sure if I like it or not,
> but just thinking out loud for a moment. The issue is that we're worried
> the consumer of the output may be surprised by a user-configured pretty
> format. Can we give them a way to say "I don't care about the exact
> output; pick what the user configured for this name, or some sane
> default". I.e., something like:
>
> git log --format=loose:reference
Yeah, that, or with s/loose/user/ or something.
next prev parent reply other threads:[~2020-09-08 18:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-05 19:24 [PATCH] pretty: allow to override the built-in formats Beat Bolli
2020-09-05 19:52 ` Denton Liu
2020-09-06 21:59 ` Junio C Hamano
2020-09-07 5:36 ` Beat Bolli
2020-09-07 6:54 ` Junio C Hamano
2020-09-07 7:06 ` Beat Bolli
2020-09-08 13:53 ` Jeff King
2020-09-08 18:12 ` Junio C Hamano [this message]
2020-09-09 9:08 ` Jeff King
2020-09-09 18:27 ` 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=xmqqzh60xhms.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=dev+git@drbeat.li \
--cc=git@vger.kernel.org \
--cc=liu.denton@gmail.com \
--cc=peff@peff.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).