Subject: Re: [PATCH v2 5/7] rebase: drop support for `--preserve-merges`

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Thu, 02 Sep 2021 16:28:16 +0200

On Wed, Sep 01 2021, Johannes Schindelin via GitGitGadget wrote:

> From: Johannes Schindelin <[email-masked]>
>
> This option was deprecated in favor of `--rebase-merges` some time ago,
> and now we retire it.
>
> Signed-off-by: Johannes Schindelin <[email-masked]>
> ---
>  .gitignore                     |    1 -
>  Documentation/git-rebase.txt   |   51 --
>  Makefile                       |    2 -
>  builtin/rebase.c               |  133 +---
>  git-rebase--preserve-merges.sh | 1057 --------------------------------
>  5 files changed, 6 insertions(+), 1238 deletions(-)
>  delete mode 100644 git-rebase--preserve-merges.sh
>
> diff --git a/.gitignore b/.gitignore
> index 311841f9bed..98d6275b20d 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -125,7 +125,6 @@
>  /git-range-diff
>  /git-read-tree
>  /git-rebase
> -/git-rebase--preserve-merges
>  /git-receive-pack
>  /git-reflog
>  /git-remote
> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
> index 55af6fd24e2..1382dc6f005 100644
> --- a/Documentation/git-rebase.txt
> +++ b/Documentation/git-rebase.txt
> @@ -525,29 +525,12 @@ i.e. commits that would be excluded by linkgit:git-log[1]'s
>  the `rebase-cousins` mode is turned on, such commits are instead rebased
>  onto `<upstream>` (or `<onto>`, if specified).
>  +
> -The `--rebase-merges` mode is similar in spirit to the deprecated
> -`--preserve-merges` but works with interactive rebases,
> -where commits can be reordered, inserted and dropped at will.
> -+
>  It is currently only possible to recreate the merge commits using the
>  `recursive` merge strategy; Different merge strategies can be used only via
>  explicit `exec git merge -s <strategy> [...]` commands.
>  +
>  See also REBASING MERGES and INCOMPATIBLE OPTIONS below.
>  
> --p::
> ---preserve-merges::
> -	[DEPRECATED: use `--rebase-merges` instead] Recreate merge commits
> -	instead of flattening the history by replaying commits a merge commit
> -	introduces. Merge conflict resolutions or manual amendments to merge
> -	commits are not preserved.
> -+
> -This uses the `--interactive` machinery internally, but combining it
> -with the `--interactive` option explicitly is generally not a good
> -idea unless you know what you are doing (see BUGS below).
> -+
> -See also INCOMPATIBLE OPTIONS below.
> -

I wonder if we should leave some variant of this in, just as a last
resort to help users who have some ancient version / finger memory &
wonder why it doesn't work, something like;

-p::
--preserve-merges:
	These options were used by the long-deprecated and now removed
	"rebase merges" backend. The `--rebase-merges` option is the
	similar in spirit replacement mode.

Also, per your ea8b7be1476 (git svn: stop using `rebase
--preserve-merges`, 2019-11-22) the use in "git svn" couldn't really be
directly compared to this, but there we usurped the "-p" flag for
--rebase-merges. Perhaps we could/should do the same here (eventually,
doesn't need to be in this series).