Re: [PATCH 0/3] rebase: learn --keep-base
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 26, 2019, 14:35 UTC
- Message-ID
- <87bm1xbt55.fsf@evledraar.gmail.com>
- In-Reply-To
- <cover.1553354374.git.liu.denton@gmail.com>
On Sat, Mar 23 2019, Denton Liu wrote:
Show 12 quoted lines
> This series teaches rebase the --keep-base option. > > 'git rebase --keep-base <upstream>' is equivalent to > 'git rebase --onto <upstream>... <upstream>' or > 'git rebase --onto $(git merge-base <upstream> HEAD) <upstream>' . > > This seems to be a common case that people (including myself!) run into; I was > able to find these StackOverflow posts about this use case: > > * https://stackoverflow.com/questions/53234798/can-i-rebase-on-a-branchs-fork-point-without-explicitly-specifying-the-parent > * https://stackoverflow.com/questions/41529128/how-do-you-rebase-only-changes-between-two-branches-into-another-branch > * https://stackoverflow.com/a/4207357
Like with another series of yours I think this would be best squashed into one patch.
Maybe I've misunderstood this but isn't this like --fork-point except with just plain "git merge-base" instead of "git merge-base --fork-point", but then again 2/3 shows multiple base aren't supported, but merge-base supports that.
I'd find something like the "DISCUSSION ON FORK-POINT MODE" in git-merge-base helpful with examples of what we'd pick in the various scenarios, and also if whatever commit this picks was something you could have "git merge-base" spew out, so you could get what rebase would do here from other tooling (which maybe is possible, but I'm confused by the "no multiple bases"...).