add tests for rebasing merged history