diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-04 00:52:37 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-04 23:31:23 -0700 |
commit | 725b06050a083474e240a2436121e0a80bb9f175 (patch) | |
tree | 3831874f7cce9b6307bcf3816525f66973878eba /t/t0055-beyond-symlinks.sh | |
parent | 806d13b1ccdbdde4bbdfb96902791c4b7ed125f6 (diff) | |
download | git-725b06050a083474e240a2436121e0a80bb9f175.tar.gz |
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-x | t/t0055-beyond-symlinks.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t0055-beyond-symlinks.sh b/t/t0055-beyond-symlinks.sh index eb11dd7821..b29c37a5a4 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 |