X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft1004-read-tree-m-u-wf.sh;h=570d3729bd2312a8d9cf90f3d2e1121a58f43de6;hb=ac083c47ea226b470afab39d975e718a475a3c78;hp=283e77cc51d241bedbd016bbfa4d418e521e49e8;hpb=29dc13319883f97618de6f03e8ffc5dc810d8786;p=git.git diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh index 283e77cc5..570d3729b 100755 --- a/t/t1004-read-tree-m-u-wf.sh +++ b/t/t1004-read-tree-m-u-wf.sh @@ -157,6 +157,41 @@ test_expect_success '3-way not overwriting local changes (their side)' ' ' +test_expect_success 'funny symlink in work tree' ' + + git reset --hard && + git checkout -b sym-b side-b && + mkdir -p a && + >a/b && + git add a/b && + git commit -m "side adds a/b" && + + rm -fr a && + git checkout -b sym-a side-a && + mkdir -p a && + ln -s ../b a/b && + git add a/b && + git commit -m "we add a/b" && + + git read-tree -m -u sym-a sym-a sym-b + +' + +test_expect_success 'funny symlink in work tree, un-unlink-able' ' + + rm -fr a b && + git reset --hard && + + git checkout sym-a && + chmod a-w a && + test_must_fail git read-tree -m -u sym-a sym-a sym-b + +' + +# clean-up from the above test +chmod a+w a +rm -fr a b + test_expect_success 'D/F setup' ' git reset --hard &&