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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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 <pclouds@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]