tvl-depot/third_party/git/t/t2106-update-index-assume-unchanged.sh
Vincent Ambo 7ef0d62730 merge(third_party/git): Merge squashed git subtree at v2.23.0
Merge commit '1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5' as 'third_party/git'
2020-01-11 23:40:29 +00:00

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