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/t3438-rebase-broken-files.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 / t3438-rebase-broken-files.sh` 69 lines ยท 1465 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='rebase behavior when on-disk files are broken' 4 5 . ./test-lib.sh 6 7 test_expect_success 'set up conflicting branches' ' 8 test_commit base file && 9 git checkout -b branch1 && 10 test_commit one file && 11 git checkout -b branch2 HEAD^ && 12 test_commit two file 13 ' 14 15 create_conflict () { 16 test_when_finished "git rebase --abort" && 17 git checkout -B tmp branch2 && 18 test_must_fail git rebase branch1 19 } 20 21 check_resolve_fails () { 22 echo resolved >file && 23 git add file && 24 test_must_fail git rebase --continue 25 } 26 27 for item in NAME EMAIL DATE 28 do 29 test_expect_success "detect missing GIT_AUTHOR_$item" ' 30 create_conflict && 31 32 grep -v $item .git/rebase-merge/author-script >tmp && 33 mv tmp .git/rebase-merge/author-script && 34 35 check_resolve_fails 36 ' 37 done 38 39 for item in NAME EMAIL DATE 40 do 41 test_expect_success "detect duplicate GIT_AUTHOR_$item" ' 42 create_conflict && 43 44 grep -i $item .git/rebase-merge/author-script >tmp && 45 cat tmp >>.git/rebase-merge/author-script && 46 47 check_resolve_fails 48 ' 49 done 50 51 test_expect_success 'unknown key in author-script' ' 52 create_conflict && 53 54 echo "GIT_AUTHOR_BOGUS=${SQ}whatever${SQ}" \ 55 >>.git/rebase-merge/author-script && 56 57 check_resolve_fails 58 ' 59 60 test_expect_success POSIXPERM,SANITY 'unwritable rebased-patches does not leak' ' 61 >.git/rebased-patches && 62 chmod a-w .git/rebased-patches && 63 64 git checkout -b side HEAD^ && 65 test_commit unrelated && 66 test_must_fail git rebase --apply --onto tmp HEAD^ 67 ' 68 69 test_done