"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: "no commits to rebase" when rebasing on the initial commit
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 31 Jan 2023 14:11:27 +0100

Download raw body.

Thread
On 2023/01/31 13:27:21 +0100, Stefan Sperling <stsp@stsp.name> wrote:
> On Tue, Jan 31, 2023 at 12:01:00PM +0100, Omar Polo wrote:
> > apparently 'got rebase' fails when rebasing directly on top of the
> > initial repository.  Test below simulates it, uncomment the
> > un-indented lines to make it pass.
> 
> Thanks, this is indeed a bug.
> 
> Fix below, with the test you provided and several adjustments.
> The existing test case which collided with your test new case has
> been tweaked. It now triggers an appropriate error which had no
> test coverage yet, and was not actually reachable :-/
> 
> With this fix, got rebase will always fast-forward the specified
> branch when history has not diverged, even if the specified branch's
> tip has no parent commits.
>  
>  make 'got rebase' work when the to-be-rebased branch has no parent commit
>  
>  found by op@, who also provided the test case

Thanks!

works as expected and it reads fine.  it's a bit embarassing that I
haven't seen that we could just skip collect_commits in that case for
the forward to work...

ok op@