* Exposing the states of sequencer, etc.
@ 2019-04-19 17:57 Phil Hord
2019-04-19 19:46 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Phil Hord @ 2019-04-19 17:57 UTC (permalink / raw)
To: Git
"Junio C Hamano via vger.kernel.org" writes:
> > When cherry-picking or reverting a sequence of commits and if the final
> > pick/revert has conflicts and the user uses `git commit` to commit the
> > conflict resolution and does not run `git cherry-pick --continue` then
> > the sequencer state is left behind. This can cause problems later.
> > ...
> I've certainly seen this myself. Do you use command line prompt
> support to remind you of the operation in progress? I do, and I
> have a suspicion that it did not help me in this situation by
> ceasing to tell me that I have leftover state files after a manual
> commit of the final step that conflicted and gave control back to
> me.
Is there some place today that we explain the many rules Git uses to
determine the operations in progress? I once had a patch to do this
in code, but I think I let it die in committee. It was something
like:
$ git status --show-progress-state
cherry-pick, conflicts, untracked
It would be helpful first to have an API for this, of course, though I
think that's where I got mired before.
I'm willing to take it on again, if there's not already some alternative.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Exposing the states of sequencer, etc.
2019-04-19 17:57 Exposing the states of sequencer, etc Phil Hord
@ 2019-04-19 19:46 ` Jeff King
2019-04-20 6:52 ` Phil Hord
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2019-04-19 19:46 UTC (permalink / raw)
To: Phil Hord; +Cc: Git
On Fri, Apr 19, 2019 at 10:57:33AM -0700, Phil Hord wrote:
> "Junio C Hamano via vger.kernel.org" writes:
>
> > > When cherry-picking or reverting a sequence of commits and if the final
> > > pick/revert has conflicts and the user uses `git commit` to commit the
> > > conflict resolution and does not run `git cherry-pick --continue` then
> > > the sequencer state is left behind. This can cause problems later.
> > > ...
> > I've certainly seen this myself. Do you use command line prompt
> > support to remind you of the operation in progress? I do, and I
> > have a suspicion that it did not help me in this situation by
> > ceasing to tell me that I have leftover state files after a manual
> > commit of the final step that conflicted and gave control back to
> > me.
>
> Is there some place today that we explain the many rules Git uses to
> determine the operations in progress? I once had a patch to do this
> in code, but I think I let it die in committee. It was something
> like:
>
> $ git status --show-progress-state
> cherry-pick, conflicts, untracked
>
> It would be helpful first to have an API for this, of course, though I
> think that's where I got mired before.
>
> I'm willing to take it on again, if there's not already some alternative.
Grep for get_state and print_state in wt-status.c. I think we only do so
for the "long" status output, but it should be possible to define a
machine-readable version for the porcelain output.
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Exposing the states of sequencer, etc.
2019-04-19 19:46 ` Jeff King
@ 2019-04-20 6:52 ` Phil Hord
0 siblings, 0 replies; 3+ messages in thread
From: Phil Hord @ 2019-04-20 6:52 UTC (permalink / raw)
To: Jeff King; +Cc: Git
Ah, yes. Thanks for the reminder, Peff. Found my original patch:
http://git.661346.n2.nabble.com/PATCHv2-git-status-show-short-sequencer-state-tc7569767.html#a7570756
I seem to recall that my next iteration of it ran into many conflicts
in wt_status.c, and that file seemed like it might be heading in this
API direction anyway, so I put it on a shelf. I guess I'm just
surprised the state checking is still so manual. I'll explore more.
On Fri, Apr 19, 2019 at 12:46 PM Jeff King <peff@peff.net> wrote:
>
> On Fri, Apr 19, 2019 at 10:57:33AM -0700, Phil Hord wrote:
>
> > "Junio C Hamano via vger.kernel.org" writes:
> >
> > > > When cherry-picking or reverting a sequence of commits and if the final
> > > > pick/revert has conflicts and the user uses `git commit` to commit the
> > > > conflict resolution and does not run `git cherry-pick --continue` then
> > > > the sequencer state is left behind. This can cause problems later.
> > > > ...
> > > I've certainly seen this myself. Do you use command line prompt
> > > support to remind you of the operation in progress? I do, and I
> > > have a suspicion that it did not help me in this situation by
> > > ceasing to tell me that I have leftover state files after a manual
> > > commit of the final step that conflicted and gave control back to
> > > me.
> >
> > Is there some place today that we explain the many rules Git uses to
> > determine the operations in progress? I once had a patch to do this
> > in code, but I think I let it die in committee. It was something
> > like:
> >
> > $ git status --show-progress-state
> > cherry-pick, conflicts, untracked
> >
> > It would be helpful first to have an API for this, of course, though I
> > think that's where I got mired before.
> >
> > I'm willing to take it on again, if there's not already some alternative.
>
> Grep for get_state and print_state in wt-status.c. I think we only do so
> for the "long" status output, but it should be possible to define a
> machine-readable version for the porcelain output.
>
> -Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-20 6:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-19 17:57 Exposing the states of sequencer, etc Phil Hord
2019-04-19 19:46 ` Jeff King
2019-04-20 6:52 ` Phil Hord
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).