Re: [PATCHv2] git-status: show short sequencer state
- From
Phil Hord <phil.hord@gmail.com>
- Date
- Oct 29, 2012, 18:05 UTC
- Message-ID
- <CABURp0o7b5aZV6jNM=DSweh-8zVgGppxVsXisAcoNk7TxHrdgQ@mail.gmail.com>
- In-Reply-To
- <5089633C.8030307@cisco.com>
On Thu, Oct 25, 2012 at 12:05 PM, Phil Hord <hordp@cisco.com> wrote:
Show 20 quoted lines
> > Jeff King wrote: >> On Tue, Oct 23, 2012 at 04:02:54PM -0400, Phil Hord wrote: >> >>> Teach git-status to report the sequencer state in short form >>> using a new --sequencer (-S) switch. Output zero or more >>> simple state token strings indicating the deduced state of the >>> git sequencer. >>> >>> Introduce a common function to determine the current sequencer >>> state so the regular status function and this short version can >>> share common code. >>> >>> Add a substate to wt_status_state to track more detailed >>> information about a state, such as "conflicted" or "resolved". >>> Move the am_empty_patch flage out of wt_status_state and into >> This patch ended up quite long. It might be a little easier to review >> if it were broken into refactoring steps (I have not looked at it too >> closely yet, but it seems like the three paragraphs above could each be >> their own commit).
I'm currently splitting this out into a series and reconsidering some of it along the way. I need some guidance.
I want to support these two modes:
A. 'git status --short' with sequence tokens added:
## conflicted
## merge
?? untracked-workdir-file
etc. B. Same as (A) but without workdir status:
## conflicted
## mergeThe user who wants 'A' would initiate it like this:
git status --sequencer
or
git status -SHow do I spell the options for 'B'? I have come up with these three
possibilities:
git --sequencer-only # Another switch
git --sequencer=only # An OPTARG parser
git -S -S # like git-diff -C -C, an OPT_COUNTUPThe first one is easy but weird, imho. The second seems silly for just one type of option. The last one is cheap to implement, but harder to explain in Documentation/
Any opinions?
Phil