git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Robert Dailey <rcdailey.lists@gmail.com>
Cc: Dennis Kaarsemaker <dennis@kaarsemaker.net>, Git <git@vger.kernel.org>
Subject: Re: Show all branches and ahead/behind states
Date: Fri, 15 May 2015 12:59:13 -0400	[thread overview]
Message-ID: <20150515165912.GA26853@peff.net> (raw)
In-Reply-To: <CAHd499Am4PFo-YRJEbQfPqtk571f4eNr_gkdy-3ATzyvBcc-jw@mail.gmail.com>

On Fri, May 15, 2015 at 09:25:22AM -0500, Robert Dailey wrote:

> > 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").

> 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

      reply	other threads:[~2015-05-15 16:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 14:57 Show all branches and ahead/behind states Robert Dailey
2015-05-14 15:55 ` Dennis Kaarsemaker
2015-05-14 17:18   ` Robert Dailey
2015-05-14 17:29     ` Dennis Kaarsemaker
2015-05-14 18:13       ` Robert Dailey
2015-05-14 22:38         ` Jeff King
2015-05-15 14:25           ` Robert Dailey
2015-05-15 16:59             ` 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=20150515165912.GA26853@peff.net \
    --to=peff@peff.net \
    --cc=dennis@kaarsemaker.net \
    --cc=git@vger.kernel.org \
    --cc=rcdailey.lists@gmail.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).