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

Re: [PATCHv3 3/4] git-status: show short sequencer state

From
Phil Hord <hordp@cisco.com>
Date
Nov 14, 2012, 19:14 UTC
Message-ID
<50A3ED8A.9080604@cisco.com>
In-Reply-To
<7vfw4caxkh.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 13 quoted lines
> Phil Hord <hordp@cisco.com> writes:
>
>> Consider the usage:
>>
>>   git status   # show work-tree status
>>   git status --short  # show short work-tree status
>>   git status --tokens  # show work-tree status in token form
> OK, your --tokens is more about *how* things are output, but it is
> unclear how it would interact with --short.  I had an impression
> that you are basing your output on the short output, whose existing
> record include "##" (that shows the branch names and states), and
> "MM", "A " and friends (that show the per-file states), by adding
> new record types that shows tree-wide states.

I am, but I don't much care for the "##" prefix, especially when combined with --null, for example. I'm inclined to remove it when --short is not provided, specifically to give scripts an easier time of parsing. But scripts are likely to need "--porcelain" as well, and currently that implies "--short". But I suppose another combination could be meaningful.

  # tokens only
  $ git status --tree
  changed-files
  # tokens and short-status
  $ git status --tree --short  
  ## changed-files
   M foo.txt
  # short-status only
  $ git status --porcelain
   M foo.txt
  # tokens only?
  $ git status --tree --porcelain
  changed-files
I think this spaghettify's the ui too much.  Maybe this instead:
  # undecorated tokens only
  $ git status --tree=porcelain
  changed-files
Show 13 quoted lines
>
>> But maybe "--tokens" has some better meaning that someone will want to
>> use in the future.  I'm not married to it.  But "git status" already
>> means "Show the working tree status".  So "git status --show-tree-state"
>> sounds redundant or meaningless.
> I didn't mean to say that you have to spell out all these words;
> "show" and "state" are redundant.
>
> The important part is that unlike the existing "per-file" state the
> "status" command is showing, the option is to add "tree-wide" state
> to the output, and my suggestion was to pick a word that makes it
> clear, rather than using "output is done using tokens" without
> saying "what is being output in tokenized form".
Thanks for clarifying. 
Phil
Previous: Junio C HamanoNext: Junio C Hamano
Message 23 of 26 in “[PATCHv2] git-status: show short sequencer state”
  1. Phil HordOct 23, 2012
  2. Phil HordOct 23, 2012
  3. Jeff KingOct 25, 2012
  4. Phil HordOct 25, 2012
  5. Phil HordOct 29, 2012
  6. Jeff KingOct 29, 2012
  7. Phil HordOct 29, 2012
  8. 0/3 git-status short sequencer state infoPhil Hord, Oct 29, 2012
  9. 1/3 Refactor print_state into get_statePhil Hord, Oct 29, 2012
  10. 2/3 wt-status: More state retrieval abstractionPhil Hord, Oct 29, 2012
  11. 3/3 git-status: show short sequencer statePhil Hord, Oct 29, 2012
  12. 0/4 git-status short sequencer state infoPhil Hord, Nov 9, 2012
  13. 1/4 Refactor print_state into get_statePhil Hord, Nov 9, 2012
  14. Ramkumar RamachandraNov 12, 2012
  15. 2/4 wt-status: Teach sequencer advice to use get_statePhil Hord, Nov 9, 2012
  16. 3/4 git-status: show short sequencer statePhil Hord, Nov 9, 2012
  17. Junio C HamanoNov 12, 2012
  18. Phil HordNov 12, 2012
  19. Phil HordNov 13, 2012
  20. Junio C HamanoNov 14, 2012
  21. Phil HordNov 14, 2012
  22. Junio C HamanoNov 14, 2012
  23. Phil HordNov 14, 2012
  24. Junio C HamanoNov 14, 2012
  25. Junio C HamanoNov 14, 2012
  26. 4/4 Add tests for git-status --sequencerPhil Hord, Nov 9, 2012

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.