Skip to content

Commit 2656ece

Browse files
committed
Merge branch 'js/rebase-deprecate-preserve-merges'
A bit more leftover clean-up to deprepcate "rebase -p". * js/rebase-deprecate-preserve-merges: rebase docs: recommend `-r` over `-p` docs: say that `--rebase=preserve` is deprecated tests: mark a couple more test cases as requiring `rebase -p`
2 parents 463dca6 + 7948b49 commit 2656ece

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

Documentation/git-pull.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ When set to `merges`, rebase using `git rebase --rebase-merges` so that
112112
the local merge commits are included in the rebase (see
113113
linkgit:git-rebase[1] for details).
114114
+
115-
When set to preserve, rebase with the `--preserve-merges` option passed
116-
to `git rebase` so that locally created merge commits will not be flattened.
115+
When set to `preserve` (deprecated in favor of `merges`), rebase with the
116+
`--preserve-merges` option passed to `git rebase` so that locally created
117+
merge commits will not be flattened.
117118
+
118119
When false, merge the current branch into the upstream branch.
119120
+

Documentation/git-rebase.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,8 @@ $ git rebase -i HEAD~5
675675

676676
And move the first patch to the end of the list.
677677

678-
You might want to preserve merges, if you have a history like this:
678+
You might want to recreate merge commits, e.g. if you have a history
679+
like this:
679680

680681
------------------
681682
X
@@ -689,7 +690,7 @@ Suppose you want to rebase the side branch starting at "A" to "Q". Make
689690
sure that the current HEAD is "B", and call
690691

691692
-----------------------------
692-
$ git rebase -i -p --onto Q O
693+
$ git rebase -i -r --onto Q O
693694
-----------------------------
694695

695696
Reordering and editing commits usually creates untested intermediate

t/t3422-rebase-incompatible-options.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,13 @@ test_rebase_am_only --ignore-whitespace
6565
test_rebase_am_only --committer-date-is-author-date
6666
test_rebase_am_only -C4
6767

68-
test_expect_success '--preserve-merges incompatible with --signoff' '
68+
test_expect_success REBASE_P '--preserve-merges incompatible with --signoff' '
6969
git checkout B^0 &&
7070
test_must_fail git rebase --preserve-merges --signoff A
7171
'
7272

73-
test_expect_success '--preserve-merges incompatible with --rebase-merges' '
73+
test_expect_success REBASE_P \
74+
'--preserve-merges incompatible with --rebase-merges' '
7475
git checkout B^0 &&
7576
test_must_fail git rebase --preserve-merges --rebase-merges A
7677
'

t/t3427-rebase-subtree.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ test_expect_success 'setup' '
3838
'
3939

4040
# FAILURE: Does not preserve master4.
41-
test_expect_failure 'Rebase -Xsubtree --preserve-merges --onto commit 4' '
41+
test_expect_failure REBASE_P \
42+
'Rebase -Xsubtree --preserve-merges --onto commit 4' '
4243
reset_rebase &&
4344
git checkout -b rebase-preserve-merges-4 master &&
4445
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
@@ -48,7 +49,8 @@ test_expect_failure 'Rebase -Xsubtree --preserve-merges --onto commit 4' '
4849
'
4950

5051
# FAILURE: Does not preserve master5.
51-
test_expect_failure 'Rebase -Xsubtree --preserve-merges --onto commit 5' '
52+
test_expect_failure REBASE_P \
53+
'Rebase -Xsubtree --preserve-merges --onto commit 5' '
5254
reset_rebase &&
5355
git checkout -b rebase-preserve-merges-5 master &&
5456
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
@@ -58,7 +60,8 @@ test_expect_failure 'Rebase -Xsubtree --preserve-merges --onto commit 5' '
5860
'
5961

6062
# FAILURE: Does not preserve master4.
61-
test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 4' '
63+
test_expect_failure REBASE_P \
64+
'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 4' '
6265
reset_rebase &&
6366
git checkout -b rebase-keep-empty-4 master &&
6467
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
@@ -68,7 +71,8 @@ test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto comm
6871
'
6972

7073
# FAILURE: Does not preserve master5.
71-
test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 5' '
74+
test_expect_failure REBASE_P \
75+
'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 5' '
7276
reset_rebase &&
7377
git checkout -b rebase-keep-empty-5 master &&
7478
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
@@ -78,7 +82,8 @@ test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto comm
7882
'
7983

8084
# FAILURE: Does not preserve Empty.
81-
test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto empty commit' '
85+
test_expect_failure REBASE_P \
86+
'Rebase -Xsubtree --keep-empty --preserve-merges --onto empty commit' '
8287
reset_rebase &&
8388
git checkout -b rebase-keep-empty-empty master &&
8489
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&

0 commit comments

Comments
 (0)