archive tests: do not use .gitattributes in working directory
We are interested in using archive mostly from a bare repository, so it should not add .gitattributes to the work tree. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Apr 18, 2009 at 00:17 UTC
ad94657fdb8b177b07d94887e1b5259f590f11a8
1 file changed
+5
-4
t/t5000-tar-tree.sh
+5
-4
@@ -50,7 +50,7 @@ test_expect_success \
50
test_expect_success \
51
'add ignored file' \
52
'echo ignore me >a/ignored &&
53
- echo ignored export-ignore >.gitattributes'
53
+ echo ignored export-ignore >.git/info/attributes'
54
55
test_expect_success \
56
'add files to repository' \
@@ -64,7 +64,7 @@ test_expect_success \
64
test_expect_success \
65
'create bare clone' \
66
'git clone --bare . bare.git &&
67
- cp .gitattributes bare.git/info/attributes'
67
+ cp .git/info/attributes bare.git/info/attributes'
68
69
test_expect_success \
70
'remove ignored file' \
@@ -139,10 +139,11 @@ test_expect_success \
139
140
test_expect_success \
141
'create archives with substfiles' \
142
- 'echo "substfile?" export-subst >a/.gitattributes &&
142
+ 'cp .git/info/attributes .git/info/attributes.before &&
143
+ echo "substfile?" export-subst >>.git/info/attributes &&
144
git archive HEAD >f.tar &&
145
git archive --prefix=prefix/ HEAD >g.tar &&
145
- rm a/.gitattributes'
146
+ mv .git/info/attributes.before .git/info/attributes'
147
148
test_expect_success \
149
'extract substfiles' \