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/t2106-update-index-assume-unchanged.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 / t2106-update-index-assume-unchanged.sh` 27 lines ยท 517 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='git update-index --assume-unchanged test. 4 ' 5 6 . ./test-lib.sh 7 8 test_expect_success 'setup' ' 9 : >file && 10 git add file && 11 git commit -m initial && 12 git branch other && 13 echo upstream >file && 14 git add file && 15 git commit -m upstream 16 ' 17 18 test_expect_success 'do not switch branches with dirty file' ' 19 git reset --hard && 20 git checkout other && 21 echo dirt >file && 22 git update-index --assume-unchanged file && 23 test_must_fail git checkout - 2>err && 24 test_grep overwritten err 25 ' 26 27 test_done