Re: Show all branches and ahead/behind states
- From
Jeff King <peff@peff.net>
- Date
- May 15, 2015, 16:59 UTC
- Message-ID
- <20150515165912.GA26853@peff.net>
- In-Reply-To
- <CAHd499Am4PFo-YRJEbQfPqtk571f4eNr_gkdy-3ATzyvBcc-jw@mail.gmail.com>
On Fri, May 15, 2015 at 09:25:22AM -0500, Robert Dailey wrote:
Show 8 quoted lines
> > It's spelled "%C(bold blue)" in the --pretty formats, but in > > for-each-ref, it's "%(color:bold blue)". Unifying these is one of those > > things that has been on the radar for a long time, but nobody has quite > > gotten around to it. > > > Thanks Jeff! That definitely fixed it. I was not able to find a > reference for this in the git docs, maybe I just overlooked it > somewhere.
It's in "git help for-each-ref" (see the section on "FIELD NAMES").
Show 5 quoted lines
> As a second query, is there a way to do column alignment? For example, > I would like the ahead/behind status in one column, and the branch > names left aligned in a 2nd column. I can't simply use tabs here since > the length of column 1 may differ more greatly than a single tab > character.
The "--pretty" format does have "%<" for doing printf-style alignment (see the "PRETTY FORMATS" section of "git help log"). But "for-each-ref" doesn't have any similar facility, as far as I know.
Again, this is something that it would be nice to fix.
-Peff