{"thread":{"id":"15579","subject":"[PATCH 0/1] Add new test to demonstrate git archive core.autocrlf inconsistency","startedAt":"2008-09-18T20:01:13Z","lastAt":"2008-09-18T20:01:13Z","messageCount":1,"participants":["Charles Bailey"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"91068","messageId":"20080918200113.GA8631@hashpling.org","threadId":"15579","inReplyTo":null,"subject":"[PATCH 0/1] Add new test to demonstrate git archive core.autocrlf inconsistency","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2008-09-18T20:01:13Z","receivedAt":"2008-09-18T20:01:13Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"Signed-off-by: Charles Bailey <charles@hashpling.org>\n---\n t/t0024-crlf-archive.sh |   46 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 46 insertions(+), 0 deletions(-)\n create mode 100644 t/t0024-crlf-archive.sh\n\ndiff --git a/t/t0024-crlf-archive.sh b/t/t0024-crlf-archive.sh\nnew file mode 100644\nindex 0000000..3511439\n--- /dev/null\n+++ b/t/t0024-crlf-archive.sh\n@@ -0,0 +1,46 @@\n+#!/bin/sh\n+\n+test_description='respect crlf in git archive'\n+\n+. ./test-lib.sh\n+UNZIP=${UNZIP:-unzip}\n+\n+test_expect_success setup '\n+\n+\tgit config core.autocrlf true\n+\n+\tprintf \"CRLF line ending\\r\\nAnd another\\r\\n\" > sample &&\n+\tgit add sample &&\n+\n+\ttest_tick &&\n+\tgit commit -m Initial\n+\n+'\n+\n+test_expect_success 'tar archive' '\n+\n+\tgit archive --format=tar HEAD |\n+\t( mkdir untarred && cd untarred && \"$TAR\" -xf - )\n+\n+\ttest_cmp sample untarred/sample\n+\n+'\n+\n+\"$UNZIP\" -v >/dev/null 2>&1\n+if [ $? -eq 127 ]; then\n+\techo \"Skipping ZIP test, because unzip was not found\"\n+\ttest_done\n+\texit\n+fi\n+\n+test_expect_failure 'zip archive' '\n+\n+\tgit archive --format=zip HEAD >test.zip &&\n+\n+\t( mkdir unzipped && cd unzipped && unzip ../test.zip ) &&\n+\n+\ttest_cmp sample unzipped/sample\n+\n+'\n+\n+test_done\n-- \n1.6.0.1.309.g4f56\n\n\n-- \nCharles Bailey\nhttp://ccgi.hashpling.plus.com/blog/\n"}]}