Skip to content

Commit

Permalink
tests: mark a couple more test cases as requiring rebase -p
Browse files Browse the repository at this point in the history
The `--preserve-merges` option has been deprecated, and as a consequence
we started to mark test cases that require that option to be supported,
in preparation for removing that support eventually.

Since we marked those test cases, a couple more crept into the test
suite, and with this patch, we mark them, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
dscho authored and gitster committed May 28, 2019
1 parent 427c3bd commit db4a3f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
5 changes: 3 additions & 2 deletions t/t3422-rebase-incompatible-options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
Expand Down
15 changes: 10 additions & 5 deletions t/t3427-rebase-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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 &&
Expand All @@ -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 &&
Expand All @@ -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 &&
Expand All @@ -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 &&
Expand Down

0 comments on commit db4a3f2

Please sign in to comment.