Re: [RFC] git-sequencer.txt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Jun 2008, Christian Couder wrote:

> Le mardi 10 juin 2008, Stephan Beyer a écrit :

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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux