]>
Commit | Line | Data |
---|---|---|
f1265cc9 CB |
1 | #!/bin/sh |
2 | ||
3 | test_description='respect crlf in git archive' | |
4 | ||
5 | . ./test-lib.sh | |
25d3d323 | 6 | |
f1265cc9 CB |
7 | test_expect_success setup ' |
8 | ||
a48fcd83 | 9 | git config core.autocrlf true && |
f1265cc9 CB |
10 | |
11 | printf "CRLF line ending\r\nAnd another\r\n" > sample && | |
12 | git add sample && | |
13 | ||
14 | test_tick && | |
15 | git commit -m Initial | |
16 | ||
17 | ' | |
18 | ||
19 | test_expect_success 'tar archive' ' | |
20 | ||
21 | git archive --format=tar HEAD | | |
a48fcd83 | 22 | ( mkdir untarred && cd untarred && "$TAR" -xf - ) && |
f1265cc9 CB |
23 | |
24 | test_cmp sample untarred/sample | |
25 | ||
26 | ' | |
27 | ||
552a26c8 | 28 | test_expect_success UNZIP 'zip archive' ' |
f1265cc9 CB |
29 | |
30 | git archive --format=zip HEAD >test.zip && | |
31 | ||
ac001282 | 32 | ( mkdir unzipped && cd unzipped && "$GIT_UNZIP" ../test.zip ) && |
f1265cc9 CB |
33 | |
34 | test_cmp sample unzipped/sample | |
35 | ||
36 | ' | |
37 | ||
38 | test_done |