git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 4/8] pull: remove support for `--rebase=preserve`
Date: Sat, 23 Nov 2019 20:50:38 +0000	[thread overview]
Message-ID: <0c8bfe5d18da5c8c5b3d63270aac3f93e793c69c.1574542243.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.195.git.1574542242.gitgitgadget@gmail.com>

From: Johannes Schindelin <johannes.schindelin@gmx.de>

In preparation for `git-rebase--preserve-merges.sh` entering its after
life, we remove this (deprecated) option that would still rely on it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 Documentation/config/branch.txt        |  4 ----
 Documentation/config/pull.txt          |  4 ----
 Documentation/git-pull.txt             |  6 +-----
 builtin/pull.c                         | 12 +++---------
 contrib/completion/git-completion.bash |  2 +-
 5 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/Documentation/config/branch.txt b/Documentation/config/branch.txt
index a592d522a7..e9986ddd09 100644
--- a/Documentation/config/branch.txt
+++ b/Documentation/config/branch.txt
@@ -85,10 +85,6 @@ When `merges`, pass the `--rebase-merges` option to 'git rebase'
 so that the local merge commits are included in the rebase (see
 linkgit:git-rebase[1] for details).
 +
-When `preserve` (deprecated in favor of `merges`), also pass
-`--preserve-merges` along to 'git rebase' so that locally committed merge
-commits will not be flattened by running 'git pull'.
-+
 When the value is `interactive`, the rebase is run in interactive mode.
 +
 *NOTE*: this is a possibly dangerous operation; do *not* use
diff --git a/Documentation/config/pull.txt b/Documentation/config/pull.txt
index b87cab31b3..9f2dea0b34 100644
--- a/Documentation/config/pull.txt
+++ b/Documentation/config/pull.txt
@@ -18,10 +18,6 @@ When `merges`, pass the `--rebase-merges` option to 'git rebase'
 so that the local merge commits are included in the rebase (see
 linkgit:git-rebase[1] for details).
 +
-When `preserve` (deprecated in favor of `merges`), also pass
-`--preserve-merges` along to 'git rebase' so that locally committed merge
-commits will not be flattened by running 'git pull'.
-+
 When the value is `interactive`, the rebase is run in interactive mode.
 +
 *NOTE*: this is a possibly dangerous operation; do *not* use
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index dfb901f8b8..edda860a9a 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -101,7 +101,7 @@ Options related to merging
 include::merge-options.txt[]
 
 -r::
---rebase[=false|true|merges|preserve|interactive]::
+--rebase[=false|true|merges|interactive]::
 	When true, rebase the current branch on top of the upstream
 	branch after fetching. If there is a remote-tracking branch
 	corresponding to the upstream branch and the upstream branch
@@ -112,10 +112,6 @@ When set to `merges`, rebase using `git rebase --rebase-merges` so that
 the local merge commits are included in the rebase (see
 linkgit:git-rebase[1] for details).
 +
-When set to `preserve` (deprecated in favor of `merges`), rebase with the
-`--preserve-merges` option passed to `git rebase` so that locally created
-merge commits will not be flattened.
-+
 When false, merge the current branch into the upstream branch.
 +
 When `interactive`, enable the interactive mode of rebase.
diff --git a/builtin/pull.c b/builtin/pull.c
index d25ff13a60..6c4d91d580 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -30,7 +30,6 @@ enum rebase_type {
 	REBASE_INVALID = -1,
 	REBASE_FALSE = 0,
 	REBASE_TRUE,
-	REBASE_PRESERVE,
 	REBASE_MERGES,
 	REBASE_INTERACTIVE
 };
@@ -38,9 +37,8 @@ enum rebase_type {
 /**
  * Parses the value of --rebase. If value is a false value, returns
  * REBASE_FALSE. If value is a true value, returns REBASE_TRUE. If value is
- * "merges", returns REBASE_MERGES. If value is "preserve", returns
- * REBASE_PRESERVE. If value is a invalid value, dies with a fatal error if
- * fatal is true, otherwise returns REBASE_INVALID.
+ * "merges", returns REBASE_MERGES. If value is a invalid value, dies with
+ * a fatal error if fatal is true, otherwise returns REBASE_INVALID.
  */
 static enum rebase_type parse_config_rebase(const char *key, const char *value,
 		int fatal)
@@ -51,8 +49,6 @@ static enum rebase_type parse_config_rebase(const char *key, const char *value,
 		return REBASE_FALSE;
 	else if (v > 0)
 		return REBASE_TRUE;
-	else if (!strcmp(value, "preserve") || !strcmp(value, "p"))
-		return REBASE_PRESERVE;
 	else if (!strcmp(value, "merges") || !strcmp(value, "m"))
 		return REBASE_MERGES;
 	else if (!strcmp(value, "interactive") || !strcmp(value, "i"))
@@ -145,7 +141,7 @@ static struct option pull_options[] = {
 	/* Options passed to git-merge or git-rebase */
 	OPT_GROUP(N_("Options related to merging")),
 	{ OPTION_CALLBACK, 'r', "rebase", &opt_rebase,
-	  "(false|true|merges|preserve|interactive)",
+	  "(false|true|merges|interactive)",
 	  N_("incorporate changes by rebasing rather than merging"),
 	  PARSE_OPT_OPTARG, parse_opt_rebase },
 	OPT_PASSTHRU('n', NULL, &opt_diffstat, NULL,
@@ -848,8 +844,6 @@ static int run_rebase(const struct object_id *curr_head,
 	/* Options passed to git-rebase */
 	if (opt_rebase == REBASE_MERGES)
 		argv_array_push(&args, "--rebase-merges");
-	else if (opt_rebase == REBASE_PRESERVE)
-		argv_array_push(&args, "--preserve-merges");
 	else if (opt_rebase == REBASE_INTERACTIVE)
 		argv_array_push(&args, "--interactive");
 	if (opt_diffstat)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 00fbe6c03d..5b37734ef1 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2276,7 +2276,7 @@ __git_complete_config_variable_value ()
 		return
 		;;
 	branch.*.rebase)
-		__gitcomp "false true merges preserve interactive" "" "$cur_"
+		__gitcomp "false true merges interactive" "" "$cur_"
 		return
 		;;
 	remote.pushdefault)
-- 
gitgitgadget


  parent reply	other threads:[~2019-11-23 20:50 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23 20:50 [PATCH 0/8] Drop support for git rebase --preserve-merges Johannes Schindelin via GitGitGadget
2019-11-23 20:50 ` [PATCH 1/8] t5520: do not use `pull.rebase=preserve` Johannes Schindelin via GitGitGadget
2019-11-23 20:50 ` [PATCH 2/8] remote: warn about unhandled branch.<name>.rebase values Johannes Schindelin via GitGitGadget
2019-11-23 20:50 ` [PATCH 3/8] tests: stop testing `git rebase --preserve-merges` Johannes Schindelin via GitGitGadget
2019-11-23 20:50 ` Johannes Schindelin via GitGitGadget [this message]
2019-11-23 20:50 ` [PATCH 5/8] rebase: drop support for `--preserve-merges` Johannes Schindelin via GitGitGadget
2019-11-23 20:50 ` [PATCH 6/8] git-svn: " Johannes Schindelin via GitGitGadget
2019-11-23 22:08   ` Eric Wong
2019-11-24 21:29     ` Johannes Schindelin
2019-11-25  3:15       ` Eric Wong
2019-11-23 20:50 ` [PATCH 7/8] rebase: drop the internal `rebase--interactive` command Johannes Schindelin via GitGitGadget
2019-11-23 20:50 ` [PATCH 8/8] remote: no longer claim that branch.*.rebase=preserve is a thing Johannes Schindelin via GitGitGadget
2021-09-01 11:57 ` [PATCH v2 0/7] Drop support for git rebase --preserve-merges Johannes Schindelin via GitGitGadget
2021-09-01 11:57   ` [PATCH v2 1/7] t5520: do not use `pull.rebase=preserve` Johannes Schindelin via GitGitGadget
2021-09-01 11:57   ` [PATCH v2 2/7] remote: warn about unhandled branch.<name>.rebase values Johannes Schindelin via GitGitGadget
2021-09-01 11:57   ` [PATCH v2 3/7] tests: stop testing `git rebase --preserve-merges` Johannes Schindelin via GitGitGadget
2021-09-01 13:26     ` Ævar Arnfjörð Bjarmason
2021-09-01 11:57   ` [PATCH v2 4/7] pull: remove support for `--rebase=preserve` Johannes Schindelin via GitGitGadget
2021-09-01 11:57   ` [PATCH v2 5/7] rebase: drop support for `--preserve-merges` Johannes Schindelin via GitGitGadget
2021-09-01 12:21     ` Ævar Arnfjörð Bjarmason
2021-09-02 13:54       ` Johannes Schindelin
2021-09-02 14:11         ` Ævar Arnfjörð Bjarmason
2021-09-01 13:33     ` Ævar Arnfjörð Bjarmason
2021-09-02 13:59       ` Johannes Schindelin
2021-09-02 14:16         ` Ævar Arnfjörð Bjarmason
2021-09-02 14:28     ` Ævar Arnfjörð Bjarmason
2021-09-02 14:34     ` Ævar Arnfjörð Bjarmason
2021-09-02 14:56       ` Ævar Arnfjörð Bjarmason
2021-09-02 15:34         ` Ævar Arnfjörð Bjarmason
2021-09-04 19:41       ` Johannes Schindelin
2021-09-05  7:32         ` Ævar Arnfjörð Bjarmason
2021-09-05 22:36           ` Junio C Hamano
2021-09-06 10:15     ` Phillip Wood
2021-09-07 12:32       ` Johannes Schindelin
2021-09-07 15:31         ` Phillip Wood
2021-09-07 19:44           ` Johannes Schindelin
2021-09-01 11:57   ` [PATCH v2 6/7] git-svn: " Johannes Schindelin via GitGitGadget
2021-09-01 13:25     ` Ævar Arnfjörð Bjarmason
2021-09-02 14:00       ` Johannes Schindelin
2021-09-02 14:08       ` Johannes Schindelin
2021-09-01 11:57   ` [PATCH v2 7/7] rebase: drop the internal `rebase--interactive` command Johannes Schindelin via GitGitGadget
2021-09-06 10:10     ` Phillip Wood
2021-09-07 12:39       ` Johannes Schindelin
2021-09-01 13:37   ` [PATCH v2 0/7] Drop support for git rebase --preserve-merges Ævar Arnfjörð Bjarmason
2021-09-02 14:16     ` Johannes Schindelin
2021-09-02 14:51       ` Ævar Arnfjörð Bjarmason
2021-09-01 22:25   ` Junio C Hamano
2021-09-02 14:18     ` Johannes Schindelin
2021-09-02 20:06       ` Johannes Sixt
2021-09-07 17:33         ` Johannes Schindelin
2021-09-07 22:48           ` Elijah Newren
2021-09-10 12:08             ` Johannes Schindelin
2021-09-10 17:16               ` Elijah Newren
2021-09-13 11:24                 ` merge-ort and --rebase-merges, was " Johannes Schindelin
2021-09-13 15:53                   ` Elijah Newren
2021-09-06  6:58     ` Ævar Arnfjörð Bjarmason
2021-09-07 18:27       ` Junio C Hamano
2021-09-07 19:52         ` Ævar Arnfjörð Bjarmason
2021-09-04 22:30   ` Alban Gruin
2021-09-06 10:17     ` Phillip Wood
2021-09-07 12:48     ` Johannes Schindelin
2021-09-07 21:05   ` [PATCH v3 00/11] " Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 01/11] t5520: do not use `pull.rebase=preserve` Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 02/11] remote: warn about unhandled branch.<name>.rebase values Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 03/11] tests: stop testing `git rebase --preserve-merges` Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 04/11] pull: remove support for `--rebase=preserve` Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 05/11] rebase: drop support for `--preserve-merges` Johannes Schindelin via GitGitGadget
2021-09-10 14:53       ` Ævar Arnfjörð Bjarmason
2022-07-21 19:02       ` re-mentioning --preserve-merges in the docs (was: [PATCH v3 05/11] rebase: drop support for `--preserve-merges`) Ævar Arnfjörð Bjarmason
2022-07-21 20:15         ` re-mentioning --preserve-merges in the docs Junio C Hamano
2022-07-29 13:24           ` Johannes Schindelin
2021-09-07 21:05     ` [PATCH v3 06/11] git-svn: drop support for `--preserve-merges` Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 07/11] rebase: drop the internal `rebase--interactive` command Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 08/11] rebase: remove obsolete code comment Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 09/11] rebase: stop mentioning the -p option in comments Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 10/11] rebase: remove a no-longer-used function Johannes Schindelin via GitGitGadget
2021-09-07 21:05     ` [PATCH v3 11/11] sequencer: restrict scope of a formerly public function Johannes Schindelin via GitGitGadget
2021-09-08  1:30     ` [PATCH v3 00/11] Drop support for git rebase --preserve-merges Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c8bfe5d18da5c8c5b3d63270aac3f93e793c69c.1574542243.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).