debian: new upstream point release
[git/debian.git] / t / t2106-update-index-assume-unchanged.sh
blob95c004dc5c5462b8b18cf348e5b1c44115a73042
1 #!/bin/sh
3 test_description='git update-index --assume-unchanged test.
6 TEST_PASSES_SANITIZE_LEAK=true
7 . ./test-lib.sh
9 test_expect_success 'setup' '
10 : >file &&
11 git add file &&
12 git commit -m initial &&
13 git branch other &&
14 echo upstream >file &&
15 git add file &&
16 git commit -m upstream
19 test_expect_success 'do not switch branches with dirty file' '
20 git reset --hard &&
21 git checkout other &&
22 echo dirt >file &&
23 git update-index --assume-unchanged file &&
24 test_must_fail git checkout - 2>err &&
25 test_grep overwritten err
28 test_done