Skip to content

Commit aa4df10

Browse files
dschogitster
authored andcommitted
tests: stop testing git rebase --preserve-merges
This backend has been deprecated in favor of `git rebase --rebase-merges`. In preparation for dropping it, let's remove all the regression tests that would need it. Signed-off-by: Johannes Schindelin <[email protected]> Reviewed-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ab7c7c2 commit aa4df10

17 files changed

+3
-764
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ jobs:
198198
shell: bash
199199
env:
200200
NO_SVN_TESTS: 1
201-
GIT_TEST_SKIP_REBASE_P: 1
202201
run: ci/run-test-slice.sh ${{matrix.nr}} 10
203202
- name: ci/print-test-failures.sh
204203
if: failure()

t/t3404-rebase-interactive.sh

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -351,82 +351,6 @@ test_expect_success 'retain authorship when squashing' '
351351
git show HEAD | grep "^Author: Twerp Snog"
352352
'
353353

354-
test_expect_success REBASE_P '-p handles "no changes" gracefully' '
355-
HEAD=$(git rev-parse HEAD) &&
356-
git rebase -i -p HEAD^ &&
357-
git update-index --refresh &&
358-
git diff-files --quiet &&
359-
git diff-index --quiet --cached HEAD -- &&
360-
test $HEAD = $(git rev-parse HEAD)
361-
'
362-
363-
test_expect_failure REBASE_P 'exchange two commits with -p' '
364-
git checkout H &&
365-
(
366-
set_fake_editor &&
367-
FAKE_LINES="2 1" git rebase -i -p HEAD~2
368-
) &&
369-
test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
370-
test G = $(git cat-file commit HEAD | sed -ne \$p)
371-
'
372-
373-
test_expect_success REBASE_P 'preserve merges with -p' '
374-
git checkout -b to-be-preserved primary^ &&
375-
: > unrelated-file &&
376-
git add unrelated-file &&
377-
test_tick &&
378-
git commit -m "unrelated" &&
379-
git checkout -b another-branch primary &&
380-
echo B > file1 &&
381-
test_tick &&
382-
git commit -m J file1 &&
383-
test_tick &&
384-
git merge to-be-preserved &&
385-
echo C > file1 &&
386-
test_tick &&
387-
git commit -m K file1 &&
388-
echo D > file1 &&
389-
test_tick &&
390-
git commit -m L1 file1 &&
391-
git checkout HEAD^ &&
392-
echo 1 > unrelated-file &&
393-
test_tick &&
394-
git commit -m L2 unrelated-file &&
395-
test_tick &&
396-
git merge another-branch &&
397-
echo E > file1 &&
398-
test_tick &&
399-
git commit -m M file1 &&
400-
git checkout -b to-be-rebased &&
401-
test_tick &&
402-
git rebase -i -p --onto branch1 primary &&
403-
git update-index --refresh &&
404-
git diff-files --quiet &&
405-
git diff-index --quiet --cached HEAD -- &&
406-
test_cmp_rev HEAD~6 branch1 &&
407-
test_cmp_rev HEAD~4^2 to-be-preserved &&
408-
test_cmp_rev HEAD^^2^ HEAD^^^ &&
409-
test $(git show HEAD~5:file1) = B &&
410-
test $(git show HEAD~3:file1) = C &&
411-
test $(git show HEAD:file1) = E &&
412-
test $(git show HEAD:unrelated-file) = 1
413-
'
414-
415-
test_expect_success REBASE_P 'edit ancestor with -p' '
416-
(
417-
set_fake_editor &&
418-
FAKE_LINES="1 2 edit 3 4" git rebase -i -p HEAD~3
419-
) &&
420-
echo 2 > unrelated-file &&
421-
test_tick &&
422-
git commit -m L2-modified --amend unrelated-file &&
423-
git rebase --continue &&
424-
git update-index --refresh &&
425-
git diff-files --quiet &&
426-
git diff-index --quiet --cached HEAD -- &&
427-
test $(git show HEAD:unrelated-file) = 2
428-
'
429-
430354
test_expect_success '--continue tries to commit' '
431355
git reset --hard D &&
432356
test_tick &&

t/t3408-rebase-multi-line.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,4 @@ test_expect_success rebase '
5555
test_cmp expect actual
5656
5757
'
58-
test_expect_success REBASE_P rebasep '
59-
60-
git checkout side-merge &&
61-
git rebase -p side &&
62-
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
63-
git cat-file commit side-merge-original | sed -e "1,/^\$/d" >expect &&
64-
test_cmp expect actual
65-
66-
'
67-
6858
test_done

t/t3409-rebase-preserve-merges.sh

Lines changed: 0 additions & 130 deletions
This file was deleted.

t/t3410-rebase-preserve-dropped-merges.sh

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)