Re: Replicating the default "git log" format with a format string.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]