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

From: Phil Hord <[email-masked]>
Date: Wed, 14 Nov 2012 14:14:18 -0500

Junio C Hamano wrote:
> Phil Hord <[email-masked]> 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

>
>> 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