mbox series

[00/12] rebase -r: support merge strategies other than recursive

Message ID pull.294.git.gitgitgadget@gmail.com (mailing list archive)
Headers show
Series rebase -r: support merge strategies other than recursive | expand

Message

Koji Nakamaru via GitGitGadget July 25, 2019, 10:11 a.m. UTC
This is the most notable shortcoming that --rebase-merges has, still,
relative to --preserve-merges' capabilities: it does not support passing
custom merge strategies or custom merge strategy options.

Let's fix this.

While working on this patch series, of course I tried to copy-edit the test
cases we have, to cover --preserve-merges' support for merge strategies. Oh
my, did I regret this decision as soon as my eyes set sight on 
t3427-rebase-subtree.sh!

At first I tried my best to make heads or tails of t3427, for way too long.
In the end the only way to understand what the heck it tries to do was to
actually fix it. That's why this patch series looks as if it focuses on
t3427 rather than on adding support for custom merge strategies to the 
--rebase-merges mode.

As a consolation to myself, this work was actually worth it, surprising as
that may look. Not only is t3427 now really easy to understand, adding that
test case for --rebase-merges -Xsubtree tickled the sequencer enough to
reveal a long-standing bug: the --onto option was simply ignored when passed
together with --rebase-merges and --root. For good measure, this patch
series addresses this bug, too.

Johannes Schindelin (12):
  t3427: add a clarifying comment
  t3427: simplify the `setup` test case significantly
  t3427: move the `filter-branch` invocation into the `setup` case
  t3427: condense the unnecessarily repetitive test cases into three
  t3427: fix erroneous assumption
  t3427: accommodate for the `rebase --merge` backend having been
    replaced
  t3427: fix another incorrect assumption
  t3427: mark two test cases as requiring support for `git rebase -p`
  rebase -r: support merge strategies other than `recursive`
  t/lib-rebase: prepare for testing `git rebase --rebase-merges`
  t3418: test `rebase -r` with merge strategies
  rebase -r: do not (re-)generate root commits with `--root` *and*
    `--onto`

 Documentation/git-rebase.txt           |   2 -
 builtin/rebase.c                       |  16 +--
 sequencer.c                            |  18 ++-
 sequencer.h                            |   6 +
 t/lib-rebase.sh                        |   8 +-
 t/t3418-rebase-continue.sh             |  14 +++
 t/t3422-rebase-incompatible-options.sh |  10 --
 t/t3427-rebase-subtree.sh              | 150 ++++++++++++-------------
 t/t3430-rebase-merges.sh               |  21 ++++
 9 files changed, 134 insertions(+), 111 deletions(-)


base-commit: 082ef75b7bfc90ac236afbb857a9552a026832b8
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-294%2Fdscho%2Frebase-r-with-strategies-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-294/dscho/rebase-r-with-strategies-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/294

Comments

Junio C Hamano July 25, 2019, 5:10 p.m. UTC | #1
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> ... As a consolation to myself, this work was actually worth it, surprising as
> that may look. Not only is t3427 now really easy to understand, adding that
> test case for --rebase-merges -Xsubtree tickled the sequencer enough to
> reveal a long-standing bug: the --onto option was simply ignored when passed
> together with --rebase-merges and --root. For good measure, this patch
> series addresses this bug, too.

Very nice.

> base-commit: 082ef75b7bfc90ac236afbb857a9552a026832b8
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-294%2Fdscho%2Frebase-r-with-strategies-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-294/dscho/rebase-r-with-strategies-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/294
brian m. carlson July 26, 2019, 7:52 a.m. UTC | #2
On 2019-07-25 at 10:11:14, Johannes Schindelin via GitGitGadget wrote:
> This is the most notable shortcoming that --rebase-merges has, still,
> relative to --preserve-merges' capabilities: it does not support passing
> custom merge strategies or custom merge strategy options.
> 
> Let's fix this.

This looks like a great improvement. I'm glad to see --rebase-merges
gaining feature parity with --preserve-merges.