t3430: add conflicting commit
Move the creation of conflicting-G from a test to the setup so that it can be used in subsequent tests without creating the kind of implicit dependencies that plague t3404. While we're at it simplify the arguments to the test_commit() call the creates the conflicting commit. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
53f9a3e157
commit
d54e189862
@ -13,8 +13,10 @@ Initial setup:
|
|||||||
-- B -- (first)
|
-- B -- (first)
|
||||||
/ \
|
/ \
|
||||||
A - C - D - E - H (master)
|
A - C - D - E - H (master)
|
||||||
\ /
|
\ \ /
|
||||||
F - G (second)
|
\ F - G (second)
|
||||||
|
\
|
||||||
|
Conflicting-G
|
||||||
'
|
'
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-rebase.sh
|
. "$TEST_DIRECTORY"/lib-rebase.sh
|
||||||
@ -49,7 +51,9 @@ test_expect_success 'setup' '
|
|||||||
git merge --no-commit G &&
|
git merge --no-commit G &&
|
||||||
test_tick &&
|
test_tick &&
|
||||||
git commit -m H &&
|
git commit -m H &&
|
||||||
git tag -m H H
|
git tag -m H H &&
|
||||||
|
git checkout A &&
|
||||||
|
test_commit conflicting-G G.t
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'create completely different structure' '
|
test_expect_success 'create completely different structure' '
|
||||||
@ -72,7 +76,7 @@ test_expect_success 'create completely different structure' '
|
|||||||
EOF
|
EOF
|
||||||
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
|
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
|
||||||
test_tick &&
|
test_tick &&
|
||||||
git rebase -i -r A &&
|
git rebase -i -r A master &&
|
||||||
test_cmp_graph <<-\EOF
|
test_cmp_graph <<-\EOF
|
||||||
* Merge the topic branch '\''onebranch'\''
|
* Merge the topic branch '\''onebranch'\''
|
||||||
|\
|
|\
|
||||||
@ -141,8 +145,7 @@ test_expect_success 'failed `merge` writes patch (may be rescheduled, too)' '
|
|||||||
|
|
||||||
: fail because of merge conflict &&
|
: fail because of merge conflict &&
|
||||||
rm G.t .git/rebase-merge/patch &&
|
rm G.t .git/rebase-merge/patch &&
|
||||||
git reset --hard &&
|
git reset --hard conflicting-G &&
|
||||||
test_commit conflicting-G G.t not-G conflicting-G &&
|
|
||||||
test_must_fail git rebase --continue &&
|
test_must_fail git rebase --continue &&
|
||||||
! grep "^merge -C .* G$" .git/rebase-merge/git-rebase-todo &&
|
! grep "^merge -C .* G$" .git/rebase-merge/git-rebase-todo &&
|
||||||
test_path_is_file .git/rebase-merge/patch
|
test_path_is_file .git/rebase-merge/patch
|
||||||
|
Reference in New Issue
Block a user