]> git.ipfire.org Git - thirdparty/git.git/blame - t/t0024-crlf-archive.sh
logmsg_reencode: lazily load missing commit buffers
[thirdparty/git.git] / t / t0024-crlf-archive.sh
CommitLineData
f1265cc9
CB
1#!/bin/sh
2
3test_description='respect crlf in git archive'
4
5. ./test-lib.sh
ac001282 6GIT_UNZIP=${GIT_UNZIP:-unzip}
f1265cc9 7
25d3d323
RS
8test_lazy_prereq UNZIP '
9 "$GIT_UNZIP" -v
10 test $? -ne 127
11'
12
f1265cc9
CB
13test_expect_success setup '
14
a48fcd83 15 git config core.autocrlf true &&
f1265cc9
CB
16
17 printf "CRLF line ending\r\nAnd another\r\n" > sample &&
18 git add sample &&
19
20 test_tick &&
21 git commit -m Initial
22
23'
24
25test_expect_success 'tar archive' '
26
27 git archive --format=tar HEAD |
a48fcd83 28 ( mkdir untarred && cd untarred && "$TAR" -xf - ) &&
f1265cc9
CB
29
30 test_cmp sample untarred/sample
31
32'
33
552a26c8 34test_expect_success UNZIP 'zip archive' '
f1265cc9
CB
35
36 git archive --format=zip HEAD >test.zip &&
37
ac001282 38 ( mkdir unzipped && cd unzipped && "$GIT_UNZIP" ../test.zip ) &&
f1265cc9
CB
39
40 test_cmp sample unzipped/sample
41
42'
43
44test_done