summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-05-30 17:50:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-05-30 17:50:45 (GMT)
commit2656eceae7dba180fb59a8ccbb448d8710c9f2d8 (patch)
treefac4449bb696b056a6cf00462d4c174e9ca170e8
parent463dca6476be5f4998f8a836cd8141f58e1b42ee (diff)
parent7948b49ac7be06dd926b5a86e70f7f40f3041899 (diff)
downloadgit-2656eceae7dba180fb59a8ccbb448d8710c9f2d8.zip
git-2656eceae7dba180fb59a8ccbb448d8710c9f2d8.tar.gz
git-2656eceae7dba180fb59a8ccbb448d8710c9f2d8.tar.bz2
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`
-rw-r--r--Documentation/git-pull.txt5
-rw-r--r--Documentation/git-rebase.txt5
-rwxr-xr-xt/t3422-rebase-incompatible-options.sh5
-rwxr-xr-xt/t3427-rebase-subtree.sh15
4 files changed, 19 insertions, 11 deletions
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 118d9d8..a5e9501 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -112,8 +112,9 @@ 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, rebase with the `--preserve-merges` option passed
-to `git rebase` so that locally created merge commits will not be flattened.
+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.
+
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index f5e6ae3..5e4e927 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -675,7 +675,8 @@ $ git rebase -i HEAD~5
And move the first patch to the end of the list.
-You might want to preserve merges, if you have a history like this:
+You might want to recreate merge commits, e.g. if you have a history
+like this:
------------------
X
@@ -689,7 +690,7 @@ Suppose you want to rebase the side branch starting at "A" to "Q". Make
sure that the current HEAD is "B", and call
-----------------------------
-$ git rebase -i -p --onto Q O
+$ git rebase -i -r --onto Q O
-----------------------------
Reordering and editing commits usually creates untested intermediate
diff --git a/t/t3422-rebase-incompatible-options.sh b/t/t3422-rebase-incompatible-options.sh
index bb78a6e..a5868ea 100755
--- a/t/t3422-rebase-incompatible-options.sh
+++ b/t/t3422-rebase-incompatible-options.sh
@@ -65,12 +65,13 @@ test_rebase_am_only --ignore-whitespace
test_rebase_am_only --committer-date-is-author-date
test_rebase_am_only -C4
-test_expect_success '--preserve-merges incompatible with --signoff' '
+test_expect_success REBASE_P '--preserve-merges incompatible with --signoff' '
git checkout B^0 &&
test_must_fail git rebase --preserve-merges --signoff A
'
-test_expect_success '--preserve-merges incompatible with --rebase-merges' '
+test_expect_success REBASE_P \
+ '--preserve-merges incompatible with --rebase-merges' '
git checkout B^0 &&
test_must_fail git rebase --preserve-merges --rebase-merges A
'
diff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh
index 3780877..d864052 100755
--- a/t/t3427-rebase-subtree.sh
+++ b/t/t3427-rebase-subtree.sh
@@ -38,7 +38,8 @@ test_expect_success 'setup' '
'
# FAILURE: Does not preserve master4.
-test_expect_failure 'Rebase -Xsubtree --preserve-merges --onto commit 4' '
+test_expect_failure REBASE_P \
+ 'Rebase -Xsubtree --preserve-merges --onto commit 4' '
reset_rebase &&
git checkout -b rebase-preserve-merges-4 master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
@@ -48,7 +49,8 @@ test_expect_failure 'Rebase -Xsubtree --preserve-merges --onto commit 4' '
'
# FAILURE: Does not preserve master5.
-test_expect_failure 'Rebase -Xsubtree --preserve-merges --onto commit 5' '
+test_expect_failure REBASE_P \
+ 'Rebase -Xsubtree --preserve-merges --onto commit 5' '
reset_rebase &&
git checkout -b rebase-preserve-merges-5 master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
@@ -58,7 +60,8 @@ test_expect_failure 'Rebase -Xsubtree --preserve-merges --onto commit 5' '
'
# FAILURE: Does not preserve master4.
-test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 4' '
+test_expect_failure REBASE_P \
+ 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 4' '
reset_rebase &&
git checkout -b rebase-keep-empty-4 master &&
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
'
# FAILURE: Does not preserve master5.
-test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 5' '
+test_expect_failure REBASE_P \
+ 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 5' '
reset_rebase &&
git checkout -b rebase-keep-empty-5 master &&
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
'
# FAILURE: Does not preserve Empty.
-test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto empty commit' '
+test_expect_failure REBASE_P \
+ 'Rebase -Xsubtree --keep-empty --preserve-merges --onto empty commit' '
reset_rebase &&
git checkout -b rebase-keep-empty-empty master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&