From: Jonathan Nieder Date: Tue, 09 Nov 2010 14:06:15 GMT Subject: Re: [PATCH] checkout: do not switch branch during a rebase unless -f is given Message-ID: <20101109140615.GA18960@burratino> In-Reply-To: Nguyen Thai Ngoc Duy wrote: > Another approach is to let checkout work as usual, but refuse update refs: > > - after rebase starts, HEAD can only be updated either by rebase, or > any commands that keep HEAD a headless ref. > - the branch being rebased is locked. No commands but rebase can update it. > > I think the second point is good for all interactive commands like > rebase. Create a .lock file with a signature inside (e.g. command > name). If update_ref() callers do not give correct signature, refuse > to update. I like it. Would it be possible to make sure the (widespread?) practice of using rm -fr .git/rebase-merge to terminate a rebase without going back to the original branch still works? I think it should be.