git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/5] archive tests: do not use .gitattributes in working directory

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Apr 17, 2009, 22:17 UTC
Message-ID
<49E9000D.1050808@lsrfire.ath.cx>
In-Reply-To
<1239848917-14399-1-git-send-email-gitster@pobox.com>

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>
---
 t/t5000-tar-tree.sh |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 7641e0d..abb41b0 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -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' \
@@ -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' \
@@ -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' \
-- 
1.6.3.rc0
Previous: René ScharfeNext: René Scharfe
Message 15 of 19 in “archive attribute series”
  1. 0/5 archive attribute seriesJunio C Hamano, Apr 16, 2009
  2. 1/5 archive tests: do not use .gitattributes in working directoryJunio C Hamano, Apr 16, 2009
  3. 2/5 attr: add GIT_ATTR_INDEX "direction"Junio C Hamano, Apr 16, 2009
  4. 3/5 unpack-trees: do not muck with attributes when we are not checking outJunio C Hamano, Apr 16, 2009
  5. 4/5 archive: do not read .gitattributes in working directoryJunio C Hamano, Apr 16, 2009
  6. 5/5 archive test: test new --fix-attributes featureJunio C Hamano, Apr 16, 2009
  7. René ScharfeApr 17, 2009
  8. Junio C HamanoApr 16, 2009
  9. Jeff KingApr 16, 2009
  10. Jakub NarebskiApr 16, 2009
  11. Nguyen Thai Ngoc DuyApr 16, 2009
  12. Nguyen Thai Ngoc DuyApr 16, 2009
  13. René ScharfeApr 17, 2009
  14. René ScharfeApr 17, 2009
  15. 1/5 archive tests: do not use .gitattributes in working directoryRené Scharfe, Apr 17, 2009
  16. 2/5 attr: add GIT_ATTR_INDEX "direction"René Scharfe, Apr 17, 2009
  17. 3/5 unpack-trees: do not muck with attributes when we are not checking outRené Scharfe, Apr 17, 2009
  18. 4/5 archive: do not read .gitattributes in working directoryRené Scharfe, Apr 17, 2009
  19. 5/5 archive test: attributesRené Scharfe, Apr 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.