Thread (21 messages) flat view 21 messages, 3 authors, 2016-06-15
STALE3735d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 3/8] archive: add a failure test wrt .gitattributes misreading

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:46:34
Subsystem: the rest · Maintainer: Linus Torvalds

"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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help