{"thread":{"id":"12750","subject":"[PATCH] Add tests to catch problems with un-unlinkable symlinks","startedAt":"2008-03-19T04:59:39Z","lastAt":"2008-03-19T04:59:39Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"72379","messageId":"7v7ifz5mx0.fsf@gitster.siamese.dyndns.org","threadId":"12750","inReplyTo":null,"subject":"[PATCH] Add tests to catch problems with un-unlinkable symlinks","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-19T04:59:39Z","receivedAt":"2008-03-19T04:59:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This currently fails not because we refuse to check out, but because we\ndetect error but incorrectly discard it in the callchain.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * The next one will fix it.\n\n t/t1004-read-tree-m-u-wf.sh |   35 +++++++++++++++++++++++++++++++++++\n 1 files changed, 35 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh\nindex 283e77c..1356148 100755\n--- a/t/t1004-read-tree-m-u-wf.sh\n+++ b/t/t1004-read-tree-m-u-wf.sh\n@@ -157,6 +157,41 @@ test_expect_success '3-way not overwriting local changes (their side)' '\n \n '\n \n+test_expect_success 'funny symlink in work tree' '\n+\n+\tgit reset --hard &&\n+\tgit checkout -b sym-b side-b &&\n+\tmkdir -p a &&\n+\t>a/b &&\n+\tgit add a/b &&\n+\tgit commit -m \"side adds a/b\" &&\n+\n+\trm -fr a &&\n+\tgit checkout -b sym-a side-a &&\n+\tmkdir -p a &&\n+\tln -s ../b a/b &&\n+\tgit add a/b &&\n+\tgit commit -m \"we add a/b\" &&\n+\n+\tgit read-tree -m -u sym-a sym-a sym-b\n+\n+'\n+\n+test_expect_failure 'funny symlink in work tree, un-unlink-able' '\n+\n+\trm -fr a b &&\n+\tgit reset --hard &&\n+\n+\tgit checkout sym-a &&\n+\tchmod a-w a &&\n+\ttest_must_fail git read-tree -m -u sym-a sym-a sym-b\n+\n+'\n+\n+# clean-up from the above test\n+chmod a+w a\n+rm -fr a b\n+\n test_expect_success 'D/F setup' '\n \n \tgit reset --hard &&\n-- \n1.5.5.rc0.122.g8e28f\n"}]}