Hi,

I juggle between several hot branches, and an alphabetical listing
from 'git branch' doesn't cut it for me. I've chosen to enhance
for-each-ref so that I get output like (with color):

  $ git hot
    um-build>
    perf-manifest=
  * master=
    sparse=
    ia32-asm-cleanup>
    menuconfig-jk<>
    perf-build=
    perf-completion<

where hot is the following alias:

  for-each-ref --format='%C(red)%(HEAD)%C(reset)
  %C(green)%(refname:short)%C(reset)%(upstream:trackshort)' --count 10
  --sort='-committerdate' refs/heads

While the alias might look a bit horrendous, I get the desired output.

The last time I tried to get this feature merged, there was some
confusion about unifying the format of for-each-ref with
pretty-formats, and enhacing git-branch while at it. I tried going
down that road, but got no reviews; everyone was generally more
unhappy due to the added complexity. Months have passed since, and we
still don't have this feature.

Let's keep it simple and stupid. A terse +84,-10 (with documentation)
for this wonderful feature now. Let's get it merged, and defer the
kitchen-sink-unification efforts.

Thanks.

Ramkumar Ramachandra (3):
  for-each-ref: introduce %C(...) for color
  for-each-ref: introduce %(HEAD) asterisk marker
  for-each-ref: introduce %(upstream:track[short])

 Documentation/git-for-each-ref.txt | 14 ++++++-
 builtin/for-each-ref.c             | 80 ++++++++++++++++++++++++++++++++++----
 2 files changed, 84 insertions(+), 10 deletions(-)

-- 
1.8.4.478.g55109e3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to