Skip to content

Commit

Permalink
archive tests: do not use .gitattributes in working directory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Apr 18, 2009
1 parent 55f0566 commit ad94657
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions t/t5000-tar-tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test_expect_success \
test_expect_success \
'add ignored file' \
'echo ignore me >a/ignored &&
echo ignored export-ignore >.gitattributes'
echo ignored export-ignore >.git/info/attributes'

test_expect_success \
'add files to repository' \
Expand All @@ -64,7 +64,7 @@ test_expect_success \
test_expect_success \
'create bare clone' \
'git clone --bare . bare.git &&
cp .gitattributes bare.git/info/attributes'
cp .git/info/attributes bare.git/info/attributes'

test_expect_success \
'remove ignored file' \
Expand Down Expand Up @@ -139,10 +139,11 @@ test_expect_success \

test_expect_success \
'create archives with substfiles' \
'echo "substfile?" export-subst >a/.gitattributes &&
'cp .git/info/attributes .git/info/attributes.before &&
echo "substfile?" export-subst >>.git/info/attributes &&
git archive HEAD >f.tar &&
git archive --prefix=prefix/ HEAD >g.tar &&
rm a/.gitattributes'
mv .git/info/attributes.before .git/info/attributes'

test_expect_success \
'extract substfiles' \
Expand Down

0 comments on commit ad94657

Please sign in to comment.