git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/3] Juggling between hot branches

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Sep 27, 2013, 12:10 UTC
Message-ID
<1380283828-25420-1-git-send-email-artagnon@gmail.com>
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
Next: Ramkumar Ramachandra
Message 1 of 13 in “Juggling between hot branches”
  1. 0/3 Juggling between hot branchesRamkumar Ramachandra, Sep 27, 2013
  2. 1/3 for-each-ref: introduce %C(...) for colorRamkumar Ramachandra, Sep 27, 2013
  3. Phil HordSep 27, 2013
  4. 2/3 for-each-ref: introduce %(HEAD) asterisk markerRamkumar Ramachandra, Sep 27, 2013
  5. 3/3 for-each-ref: introduce %(upstream:track[short])Ramkumar Ramachandra, Sep 27, 2013
  6. Phil HordSep 27, 2013
  7. Ramkumar RamachandraSep 27, 2013
  8. Johannes SixtSep 27, 2013
  9. Ramkumar RamachandraSep 27, 2013
  10. Jonathan NiederSep 27, 2013
  11. Philip OakleySep 27, 2013
  12. Ramkumar RamachandraSep 27, 2013
  13. Philip OakleySep 27, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.