7ef0d62730
Merge commit '1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5' as 'third_party/git'
24 lines
496 B
Bash
Executable file
24 lines
496 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='git update-index --assume-unchanged test.
|
|
'
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'setup' \
|
|
': >file &&
|
|
git add file &&
|
|
git commit -m initial &&
|
|
git branch other &&
|
|
echo upstream >file &&
|
|
git add file &&
|
|
git commit -m upstream'
|
|
|
|
test_expect_success 'do not switch branches with dirty file' \
|
|
'git reset --hard &&
|
|
git checkout other &&
|
|
echo dirt >file &&
|
|
git update-index --assume-unchanged file &&
|
|
test_must_fail git checkout master'
|
|
|
|
test_done
|