Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t7607-merge-state.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t7607-merge-state.sh` 32 lines ยท 1010 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description="Test that merge state is as expected after failed merge" 4 5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 . ./test-lib.sh 8 9 test_expect_success 'Ensure we restore original state if no merge strategy handles it' ' 10 test_commit --no-tag "Initial" base base && 11 12 for b in branch1 branch2 branch3 13 do 14 git checkout -b $b main && 15 test_commit --no-tag "Change on $b" base $b || return 1 16 done && 17 18 git checkout branch1 && 19 # This is a merge that octopus cannot handle. Note, that it does not 20 # just hit conflicts, it completely fails and says that it cannot 21 # handle this type of merge. 22 test_expect_code 2 git merge branch2 branch3 >output 2>&1 && 23 test_grep "fatal: merge program failed" output && 24 test_grep "Should not be doing an octopus" output && 25 26 # Make sure we did not leave stray changes around when no appropriate 27 # merge strategy was found 28 git diff --exit-code --name-status && 29 test_path_is_missing .git/MERGE_HEAD 30 ' 31 32 test_done