Code

Sync with 1.7.9.5
[git.git] / t / t2106-update-index-assume-unchanged.sh
1 #!/bin/sh
3 test_description='git update-index --assume-unchanged test.
4 '
6 . ./test-lib.sh
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'
17 test_expect_success 'do not switch branches with dirty file' \
18         'git reset --hard &&
19          git checkout other &&
20          echo dirt >file &&
21          git update-index --assume-unchanged file &&
22          test_must_fail git checkout master'
24 test_done