mirror of
https://github.com/git/git.git
synced 2024-12-02 22:43:44 +08:00
21 lines
344 B
Bash
21 lines
344 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
test_description='update-index refuses 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_done
|