summaryrefslogtreecommitdiff
path: root/t/t0055-beyond-symlinks.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-04 07:52:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-05 06:31:23 (GMT)
commit725b06050a083474e240a2436121e0a80bb9f175 (patch)
tree3831874f7cce9b6307bcf3816525f66973878eba /t/t0055-beyond-symlinks.sh
parent806d13b1ccdbdde4bbdfb96902791c4b7ed125f6 (diff)
downloadgit-725b06050a083474e240a2436121e0a80bb9f175.zip
git-725b06050a083474e240a2436121e0a80bb9f175.tar.gz
git-725b06050a083474e240a2436121e0a80bb9f175.tar.bz2
add: refuse to add working tree items beyond symlinks
This is the same fix for the issue of adding "sym/path" when "sym" is a symblic link that points at a directory "dir" with "path" in it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0055-beyond-symlinks.sh')
-rwxr-xr-xt/t0055-beyond-symlinks.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t0055-beyond-symlinks.sh b/t/t0055-beyond-symlinks.sh
index eb11dd7..b29c37a 100755
--- a/t/t0055-beyond-symlinks.sh
+++ b/t/t0055-beyond-symlinks.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='update-index refuses to add beyond symlinks'
+test_description='update-index and add refuse to add beyond symlinks'
. ./test-lib.sh
@@ -17,4 +17,9 @@ test_expect_success 'update-index --add beyond symlinks' '
! ( 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