"git archive" is used to create archives from a tree (or commit), so
it should not consult any .gitattributes files on working directory.
It currently does, so this patch records the failure.
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
t/t0024-crlf-archive.sh | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/t/t0024-crlf-archive.sh b/t/t0024-crlf-archive.sh
index c7d0324..9c56e0e 100755
--- a/t/t0024-crlf-archive.sh
+++ b/t/t0024-crlf-archive.sh
@@ -43,4 +43,11 @@ test_expect_success UNZIP 'zip archive' '
'
+test_expect_failure '.gitattributes in workdir should not be consulted' '
+ echo "sample -crlf" > .gitattributes &&
+ git archive --format=tar HEAD |
+ ( mkdir untarred2 && cd untarred2 && "$TAR" -xf - )
+ test_cmp sample untarred2/sample
+'
+
test_done
--
1.6.2.2.602.g83ee9f