Re: [PATCH 2/2] rebase -i --root: fix check for number of arguments
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 26, 2009, 00:49 UTC
- Message-ID
- <alpine.DEB.1.00.0901260148290.14855@racer>
- In-Reply-To
- <200901260108.07402.trast@student.ethz.ch>
Hi,
On Mon, 26 Jan 2009, Thomas Rast wrote:
Show 26 quoted lines
> Johannes Schindelin wrote: > > > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > > --- > > git-rebase--interactive.sh | 3 ++- > > 1 files changed, 2 insertions(+), 1 deletions(-) > > > > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh > > index 6e2bf25..5df35b2 100755 > > --- a/git-rebase--interactive.sh > > +++ b/git-rebase--interactive.sh > > @@ -571,7 +571,8 @@ first and then run 'git rebase --continue' again." > > ;; > > --) > > shift > > - test ! -z "$REBASE_ROOT" -o $# -eq 1 -o $# -eq 2 || usage > > + test -z "$REBASE_ROOT" -a $# -ge 1 -a $# -le 2 || > > + test ! -z "$REBASE_ROOT" -a $# -le 1 || usage > > test -d "$DOTEST" && > > die "Interactive rebase already started" > > Acked-by: Thomas Rast <trast@student.ethz.ch> > > I'll postpone 1/2 till I've had enough sleep to check whether > --continue ever needed to know about --root, and either remove or fix > the remembering. (Sorry for the noise.)
It does need to remember, as pick_one wants to look at the parent to be able to fast-forward.
But the sane fix is to add a file "$DOTEST"/root in case we're running under --root.
Ciao, Dscho