Re: [PATCH] rebase--interactive: don't enforce valid branch
- From
Dave Olszewski <cxreg@pobox.com>
- Date
- Mar 15, 2010, 05:28 UTC
- Message-ID
- <alpine.DEB.2.00.1003142227100.796@narbuckle.genericorp.net>
- In-Reply-To
- <7vsk82i2kd.fsf@alter.siamese.dyndns.org>
On Sun, 14 Mar 2010, Junio C Hamano wrote:
Show 8 quoted lines
> Dave Olszewski <cxreg@pobox.com> writes: > >> git rebase allows you to specify a non-branch commit-ish as the "branch" >> argument, which leaves HEAD detached when it's finished. This is >> occasionally useful, and this patch brings the same functionality to git >> rebase ---interactive. > > Three dashes?
Oops, good catch
Show 10 quoted lines
>> +test_expect_success 'rebase while detaching HEAD' ' >> + grandparent=$(git rev-parse HEAD~2) && >> + test_tick && >> + FAKE_LINES="2 1" git rebase -i HEAD~2 HEAD^0 && > > What's the point of saying this? You could instead say: > > git rebase -i HEAD~2 > > no?
There's already a test for rebasing on a previously detached HEAD. The form "git rebase -i HEAD~2" specifies a non-branch upstream, but doesn't take the branch argument which is the point of the change.