From: Jeff King <peff@peff.net>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Kannan Goundan <kannan@cakoose.com>, git@vger.kernel.org
Subject: Re: Replicating the default "git log" format with a format string.
Date: Fri, 13 Nov 2015 16:52:46 -0500 [thread overview]
Message-ID: <20151113215246.GA14318@sigill.intra.peff.net> (raw)
In-Reply-To: <CA+P7+xro=nNfzO6Q6-kGe6C=vJp-z_svd229kRZdf5QjQ+Di8g@mail.gmail.com>
On Fri, Nov 13, 2015 at 01:41:23PM -0800, Jacob Keller wrote:
> On Thu, Nov 12, 2015 at 9:38 PM, Jeff King <peff@peff.net> wrote:
> >> Is it possible to exactly replicate the default "git log" format with a
> >> format string?
> >
> > Sadly, no, I don't think it is possible with the current format
> > specifiers. It would be nice if it was, though.
>
> Isn't this something that might be obtainable using the new ref-filter
> work being done?
It moves in the right direction, but it isn't enough. I don't recall the
specifics, but I think it has conditional placeholders for things like
"if this is non-empty print it". But there are still some problems:
- the ref-filter formatting isn't unified with the commit
pretty-printer formatting. So this wouldn't help for a traversal,
anyway.
- the decoration thing needs a new placeholder. "%d" means "always
show the decoration", but the OP really wants "show the decoration
if the user asked for decorations, and empty otherwise".
-Peff
prev parent reply other threads:[~2015-11-13 21:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 0:55 Replicating the default "git log" format with a format string Kannan Goundan
2015-11-13 5:38 ` Jeff King
2015-11-13 21:41 ` Jacob Keller
2015-11-13 21:52 ` Jeff King [this message]
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=20151113215246.GA14318@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=jacob.keller@gmail.com \
--cc=kannan@cakoose.com \
/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).