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/t3417-rebase-whitespace-fix.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 / t3417-rebase-whitespace-fix.sh` 124 lines ยท 1938 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='git rebase --whitespace=fix 4 5 This test runs git rebase --whitespace=fix and make sure that it works. 6 ' 7 8 . ./test-lib.sh 9 10 # prepare initial revision of "file" with a blank line at the end 11 cat >file <expect-first <second <expect-second <third <expect-third 80 81 test_expect_success 'two blanks line at end of file; extend at end of file' ' 82 cp third file && git add file && git commit -m third && 83 git rebase --whitespace=fix HEAD^^ && 84 git diff --exit-code HEAD^:file expect-second && 85 test_cmp expect-third file 86 ' 87 88 test_expect_success 'same, but do not remove trailing spaces' ' 89 git config core.whitespace "-blank-at-eol" && 90 git reset --hard HEAD^ && 91 cp third file && git add file && git commit -m third && 92 git rebase --whitespace=fix HEAD^^ && 93 git diff --exit-code HEAD^:file expect-second && 94 test_cmp file third 95 ' 96 97 sed -e's/Z//' >beginning <expect-beginning <>file && 119 git commit -m more file && 120 git rebase --whitespace=fix HEAD^^ && 121 test_cmp expect-beginning file 122 ' 123 124 test_done