git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/1] rebase: deprecate --preserve-merges

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 9, 2019, 14:36 UTC
Message-ID
<nycvar.QRO.7.76.6.1905091630030.44@tvgsbejvaqbjf.bet>
In-Reply-To
<87imusj4cv.fsf@evledraar.gmail.com>
Hi Ævar,
On Thu, 2 May 2019, Ævar Arnfjörð Bjarmason wrote:
Show 36 quoted lines
> On Mon, Mar 11 2019, Johannes Schindelin via GitGitGadget wrote:
>
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > @@ -1212,6 +1212,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
> >  		usage_with_options(builtin_rebase_usage,
> >  				   builtin_rebase_options);
> >
> > +	if (options.type == REBASE_PRESERVE_MERGES)
> > +		warning(_("git rebase --preserve-merges is deprecated. "
> > +			  "Use --rebase-merges instead."));
> > +
> >  	if (action != NO_ACTION && !in_progress)
> >  		die(_("No rebase in progress?"));
> >  	setenv(GIT_REFLOG_ACTION_ENVIRONMENT, "rebase", 0);
>
> An internal user reported the following "bug" they ran into:
>
>  1. They ran "git pull --rebase=preserve"
>  2. warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
>
> This is very confusing, since the user issued "--rebase=preserve", *not*
> "--preserve-merges".
>
> We could detect that we came from "git pull" and pass down the argv we
> used blah blah, but how about just describing things a bit more in the
> warning, e.g.:
>
>     warning: the "preserve" backend for 'git rebase' has been
>     deprecated. You invoked git with "rebase --preserve-merges", either
>     directly, or via "pull --rebase=preserve".
>
>     Use the new "rebase merges" backend of "git rebase" instead, invoked
>     via "rebase --rebase-merges" or "pull --rebase=merges". Note that
>     the new backend may yield different results, see the "git rebase"
>     documentation for details.
Don't forget `pull.rebase`.

And the proposed text makes it sound as if the results of `--rebase=merges` is wrong, while I would contend that it is actually more correct than `--rebase=preserve`'s output.

In general, I do agree with the direction of making the description more general rather than trying to teach `git-rebase--preserve-merges.sh` from where it was called and showing a different deprecation message.

Do you want to take the lead on this? If so, be my guest, I still have to prepare Git for Windows for -rc0...

Ciao, Dscho

Previous: Ævar Arnfjörð Bjarmason
Message 10 of 10 in “Deprecate git rebase --preserve-merges”
  1. 0/1 Deprecate git rebase --preserve-mergesJohannes Schindelin via GitGitGadget, Mar 7, 2019
  2. 1/1 rebase: deprecate --preserve-mergesJohannes Schindelin via GitGitGadget, Mar 7, 2019
  3. Phillip WoodMar 7, 2019
  4. Johannes SchindelinMar 11, 2019
  5. Eric SunshineMar 7, 2019
  6. Johannes SchindelinMar 11, 2019
  7. 0/1 Deprecate git rebase --preserve-mergesJohannes Schindelin via GitGitGadget, Mar 11, 2019
  8. 1/1 rebase: deprecate --preserve-mergesJohannes Schindelin via GitGitGadget, Mar 11, 2019
  9. Ævar Arnfjörð BjarmasonMay 2, 2019
  10. Johannes SchindelinMay 9, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.