Skip to content

Commit b493046

Browse files
committed
pull: remove support for --rebase=preserve
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 <[email protected]>
1 parent cdb9fae commit b493046

File tree

7 files changed

+5
-23
lines changed

7 files changed

+5
-23
lines changed

Documentation/config/branch.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@ When `merges` (or just 'm'), pass the `--rebase-merges` option to 'git rebase'
8585
so that the local merge commits are included in the rebase (see
8686
linkgit:git-rebase[1] for details).
8787
+
88-
When `preserve` (or just 'p', deprecated in favor of `merges`), also pass
89-
`--preserve-merges` along to 'git rebase' so that locally committed merge
90-
commits will not be flattened by running 'git pull'.
91-
+
9288
When the value is `interactive` (or just 'i'), the rebase is run in interactive
9389
mode.
9490
+

Documentation/config/pull.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ When `merges` (or just 'm'), pass the `--rebase-merges` option to 'git rebase'
1818
so that the local merge commits are included in the rebase (see
1919
linkgit:git-rebase[1] for details).
2020
+
21-
When `preserve` (or just 'p', deprecated in favor of `merges`), also pass
22-
`--preserve-merges` along to 'git rebase' so that locally committed merge
23-
commits will not be flattened by running 'git pull'.
24-
+
2521
When the value is `interactive` (or just 'i'), the rebase is run in interactive
2622
mode.
2723
+

Documentation/git-pull.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Options related to merging
102102
include::merge-options.txt[]
103103

104104
-r::
105-
--rebase[=false|true|merges|preserve|interactive]::
105+
--rebase[=false|true|merges|interactive]::
106106
When true, rebase the current branch on top of the upstream
107107
branch after fetching. If there is a remote-tracking branch
108108
corresponding to the upstream branch and the upstream branch
@@ -113,10 +113,6 @@ When set to `merges`, rebase using `git rebase --rebase-merges` so that
113113
the local merge commits are included in the rebase (see
114114
linkgit:git-rebase[1] for details).
115115
+
116-
When set to `preserve` (deprecated in favor of `merges`), rebase with the
117-
`--preserve-merges` option passed to `git rebase` so that locally created
118-
merge commits will not be flattened.
119-
+
120116
When false, merge the upstream branch into the current branch.
121117
+
122118
When `interactive`, enable the interactive mode of rebase.

builtin/pull.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
/**
3131
* Parses the value of --rebase. If value is a false value, returns
3232
* REBASE_FALSE. If value is a true value, returns REBASE_TRUE. If value is
33-
* "merges", returns REBASE_MERGES. If value is "preserve", returns
34-
* REBASE_PRESERVE. If value is a invalid value, dies with a fatal error if
35-
* fatal is true, otherwise returns REBASE_INVALID.
33+
* "merges", returns REBASE_MERGES. If value is a invalid value, dies with
34+
* a fatal error if fatal is true, otherwise returns REBASE_INVALID.
3635
*/
3736
static enum rebase_type parse_config_rebase(const char *key, const char *value,
3837
int fatal)
@@ -126,7 +125,7 @@ static struct option pull_options[] = {
126125
/* Options passed to git-merge or git-rebase */
127126
OPT_GROUP(N_("Options related to merging")),
128127
OPT_CALLBACK_F('r', "rebase", &opt_rebase,
129-
"(false|true|merges|preserve|interactive)",
128+
"(false|true|merges|interactive)",
130129
N_("incorporate changes by rebasing rather than merging"),
131130
PARSE_OPT_OPTARG, parse_opt_rebase),
132131
OPT_PASSTHRU('n', NULL, &opt_diffstat, NULL,
@@ -883,8 +882,6 @@ static int run_rebase(const struct object_id *newbase,
883882
/* Options passed to git-rebase */
884883
if (opt_rebase == REBASE_MERGES)
885884
strvec_push(&args, "--rebase-merges");
886-
else if (opt_rebase == REBASE_PRESERVE)
887-
strvec_push(&args, "--preserve-merges");
888885
else if (opt_rebase == REBASE_INTERACTIVE)
889886
strvec_push(&args, "--interactive");
890887
if (opt_diffstat)

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2543,7 +2543,7 @@ __git_complete_config_variable_value ()
25432543
return
25442544
;;
25452545
branch.*.rebase)
2546-
__gitcomp "false true merges preserve interactive" "" "$cur_"
2546+
__gitcomp "false true merges interactive" "" "$cur_"
25472547
return
25482548
;;
25492549
remote.pushdefault)

rebase.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ enum rebase_type rebase_parse_value(const char *value)
2020
return REBASE_FALSE;
2121
else if (v > 0)
2222
return REBASE_TRUE;
23-
else if (!strcmp(value, "preserve") || !strcmp(value, "p"))
24-
return REBASE_PRESERVE;
2523
else if (!strcmp(value, "merges") || !strcmp(value, "m"))
2624
return REBASE_MERGES;
2725
else if (!strcmp(value, "interactive") || !strcmp(value, "i"))

rebase.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ enum rebase_type {
55
REBASE_INVALID = -1,
66
REBASE_FALSE = 0,
77
REBASE_TRUE,
8-
REBASE_PRESERVE,
98
REBASE_MERGES,
109
REBASE_INTERACTIVE
1110
};

0 commit comments

Comments
 (0)