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

Re: [RFC] git-sequencer.txt

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jun 11, 2008, 17:07 UTC
Message-ID
<alpine.LNX.1.00.0806111246000.19665@iabervon.org>
In-Reply-To
<200806100646.36528.chriscool@tuxfamily.org>
On Tue, 10 Jun 2008, Christian Couder wrote:
> Le mardi 10 juin 2008, Stephan Beyer a écrit :
Show 32 quoted lines
> > But it leads me to an open question I've also noticed on testing:
> >
> > If you currently start a rebase or am and there's a conflict and
> > you do
> > 	git sequencer --continue
> > instead of
> > 	git rebase --continue
> > or
> > 	git am --resolved
> > the cleanup code of rebase/am is not executed and thus the job is not
> > properly finished.
> >
> > How to prevent this?
> > My first idea is the one I don't really like: the user tools temporarily
> > generate some "post-sequencer scripts", that get executed after
> > finished sequencing. This way, it doesn't matter if you call git
> > sequencer --continue, git rebase --continue or git am --resolved to
> > finish the job.
> >
> > The second idea is that somehow the user tool should set a "CALLER"
> > environment variable or tell the caller otherwise (--caller=rebase?)
> > and git-sequencer only continues if called by the same caller.
> 
> Maybe the sequencer can look at the filename it is passed.
> If it is something like "$GIT_DIR/*/git-rebase--interactive-todo" that can 
> mean it is called by "git rebase --interactive".
> 
> And then maybe when "git sequencer --continue" is called interactively, it 
> can say something like:
> 
> "This sequencer run was started by 'git rebase --interactive' please 
> continue using 'git rebase --continue'."
I expect that most script users will do something like:
  generate-todo-file | git-sequencer

So, if there's anything to do to clean up after the outer script, the file git-sequencer gets is probably stdin.

One solution would be to have a "caller" option to sequencer, and when sequencer finishes, it runs "git $caller --cleanup". That way, you can use "git sequencer --continue", and it will do the caller-specific cleanup (also, don't forget the --abort case).

It might also be good to have options for some generic stuff, like "remove a particular directory" for callers that can just put all their temporary stuff in a single directory and don't have anything to clean up other than getting rid of it.

	-Daniel
*This .sig left intentionally blank*
Previous: Christian CouderNext: Jakub Narebski
Message 27 of 41 in “[RFC] git-sequencer.txt”
  1. Stephan BeyerJun 7, 2008
  2. squashing patches (was: Re: [RFC] git-sequencer.txt)Stephan Beyer, Jun 9, 2008
  3. Johannes SchindelinJun 9, 2008
  4. Paolo BonziniJun 9, 2008
  5. Paolo BonziniJun 9, 2008
  6. Stephan BeyerJun 9, 2008
  7. Paolo BonziniJun 9, 2008
  8. Add git-squash tool and testsStephan Beyer, Jun 9, 2008
  9. Johannes SchindelinJun 9, 2008
  10. Paolo BonziniJun 9, 2008
  11. Johannes SchindelinJun 9, 2008
  12. Stephan BeyerJun 9, 2008
  13. Johannes SchindelinJun 10, 2008
  14. Stephan BeyerJun 9, 2008
  15. Junio C HamanoJun 9, 2008
  16. Stephan BeyerJun 9, 2008
  17. Jeff KingJun 9, 2008
  18. Stephan BeyerJun 9, 2008
  19. Jeff KingJun 10, 2008
  20. Junio C HamanoJun 9, 2008
  21. Stephan BeyerJun 10, 2008
  22. Jakub NarebskiJun 9, 2008
  23. Stephan BeyerJun 10, 2008
  24. Christian CouderJun 10, 2008
  25. Stephan BeyerJun 10, 2008
  26. Christian CouderJun 11, 2008
  27. Daniel BarkalowJun 11, 2008
  28. Jakub NarebskiJun 10, 2008
  29. [RFCv2/FYI] git-sequencer.txtStephan Beyer, Jun 12, 2008
  30. Paolo BonziniJun 12, 2008
  31. Stephan BeyerJun 12, 2008
  32. git-commit: Change --reuse-message to --reuse-commit.Stephan Beyer, Jun 12, 2008
  33. Paolo BonziniJun 12, 2008
  34. Junio C HamanoJun 12, 2008
  35. Stephan BeyerJun 12, 2008
  36. Paolo BonziniJun 13, 2008
  37. Stephan BeyerJun 13, 2008
  38. Paolo BonziniJun 13, 2008
  39. Olivier MarinJun 13, 2008
  40. Jakub NarebskiJun 12, 2008
  41. Stephan BeyerJun 12, 2008

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.