summaryrefslogtreecommitdiff
path: root/t/t0055-beyond-symlinks.sh
blob: b29c37a5a4de42239474c4fdf87c86c6f27b6ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
 
test_description='update-index and add refuse to add beyond symlinks'
 
. ./test-lib.sh
 
test_expect_success setup '
	>a &&
	mkdir b &&
	ln -s b c &&
	>c/d &&
	git update-index --add a b/d
'
 
test_expect_success 'update-index --add beyond symlinks' '
	test_must_fail git update-index --add c/d &&
	! ( git ls-files | grep c/d )
'
 
test_expect_success 'add beyond symlinks' '
	test_must_fail git add c/d &&
	! ( git ls-files | grep c/d )
'
 
test_done