Revision 7c0282bfb9038516b0eeb3b7cb3c1d6ee3cb20de authored by Mike Ralphson on 17 April 2009, 18:13:29 UTC, committed by Junio C Hamano on 20 April 2009, 22:55:56 UTC
Signed-off-by: Mike Ralphson <mike@abacus.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent a162e78
t0055-beyond-symlinks.sh
#!/bin/sh
test_description='update-index and add refuse to add beyond symlinks'
. ./test-lib.sh
test_expect_success SYMLINKS setup '
>a &&
mkdir b &&
ln -s b c &&
>c/d &&
git update-index --add a b/d
'
test_expect_success SYMLINKS 'update-index --add beyond symlinks' '
test_must_fail git update-index --add c/d &&
! ( git ls-files | grep c/d )
'
test_expect_success SYMLINKS 'add beyond symlinks' '
test_must_fail git add c/d &&
! ( git ls-files | grep c/d )
'
test_done
Computing file changes ...