diff options
author | Graydon, Tracy <tracy.graydon@intel.com> | 2013-01-31 17:08:15 -0800 |
---|---|---|
committer | Graydon, Tracy <tracy.graydon@intel.com> | 2013-01-31 17:08:15 -0800 |
commit | 699fc9f67a9a62df492d1cd049e4978953640de9 (patch) | |
tree | f0c16f1494bd71922e7bf5258037427cac4a350b /t/t0055-beyond-symlinks.sh | |
download | git-699fc9f67a9a62df492d1cd049e4978953640de9.tar.gz git-699fc9f67a9a62df492d1cd049e4978953640de9.tar.bz2 git-699fc9f67a9a62df492d1cd049e4978953640de9.zip |
Initial commit for TizenHEADsubmit/2.0alpha/20130201.014617accepted/2.0alpha/20130201.0121062.0alpha
Diffstat (limited to 't/t0055-beyond-symlinks.sh')
-rwxr-xr-x | t/t0055-beyond-symlinks.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t0055-beyond-symlinks.sh b/t/t0055-beyond-symlinks.sh new file mode 100755 index 0000000..0c6ff56 --- /dev/null +++ b/t/t0055-beyond-symlinks.sh @@ -0,0 +1,25 @@ +#!/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 |