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

Re: [PATCH] branch: add show-tracking option

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 16, 2013, 08:40 UTC
Message-ID
<51949B85.40600@drmicha.warpmail.net>
In-Reply-To
<CACsJy8CrGTa2XdfFkkKDQQjF8gM3011RiUE6roe9L7yZZq5J2g@mail.gmail.com>
Duy Nguyen venit, vidit, dixit 16.05.2013 10:23:
Show 22 quoted lines
> On Thu, May 16, 2013 at 3:00 PM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> I feel, though, that we're really exploding our option and config realm.
>> For "git branch" in list mode, we are already able to stack "-v", i.e.
>> "-v" and "-vv" do different things. How about maybe adding "-vvv" and
>> arranging things so that the verbosity and the run time increases with
>> the number of v's?
>>
>> -v list with sha1 + subject of last commit
>> -vv add upstream branch name
>> -vvv add ahead/behind info (the only costly mode)
>> -vvvv same with "--cherry" (ahead/behind/same)
>>
>> Or maybe combine the middle two cases into "-vv", which means it would
>> be the same as "-vv", with only "-v" changing what it does now.
> 
> What if I want something in -vvvv except some in -vv? I think to avoid
> option explosion, maybe we can adopt --pretty=format:xxx from "git
> log" and let the user decideswhat (and how) to display. "pretty" code
> learns about alignment already, which may be useful here.
> --
> Duy

Sure, that is the big solution we've been talking about. Unify for-each-ref formats and log formats and use that. After all, "git branch" in list mode really is for-each-ref, and should be transparently so; same goes for "git tag". Think "git rev-list" and "git ref-list"!

But I guess we'll be compabeaten ;)
Michael
Previous: Duy NguyenNext: Duy Nguyen
Message 9 of 14 in “branch: add show-tracking option”
  1. branch: add show-tracking optionFelipe Contreras, May 16, 2013
  2. Felipe ContrerasMay 16, 2013
  3. Duy NguyenMay 16, 2013
  4. Felipe ContrerasMay 16, 2013
  5. Michael J GruberMay 16, 2013
  6. Felipe ContrerasMay 16, 2013
  7. Michael J GruberMay 16, 2013
  8. Duy NguyenMay 16, 2013
  9. Michael J GruberMay 16, 2013
  10. Duy NguyenMay 16, 2013
  11. Junio C HamanoMay 16, 2013
  12. Felipe ContrerasMay 16, 2013
  13. Junio C HamanoMay 16, 2013
  14. Junio C HamanoMay 16, 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.