https://github.com/git/git
Raw File
Tip revision: d9c691a759d62cef53a6cc11864a2ef4b0829244 authored by Junio C Hamano on 16 March 2016, 21:00:18 UTC
Git 2.8-rc3
Tip revision: d9c691a
t2106-update-index-assume-unchanged.sh
#!/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
back to top