Re: [PATCH] checkout: do not switch branch during a rebase unless -f is given
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 9, 2010, 14:06 UTC
- Message-ID
- <20101109140615.GA18960@burratino>
- In-Reply-To
- <AANLkTinKNF6OEX=k1aepD-Zrm2_4GzHaB+SVHdfTMG-j@mail.gmail.com>
Nguyen Thai Ngoc Duy wrote:
Show 10 quoted lines
> 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.