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

Git attributes are read from head branch instead of given branch when using git archive

From
AGAalex Gabi <aalexgabi@gmail.com>
Date
Mar 9, 2017, 21:02 UTC
Message-ID
<CABRdPwCA6UR0kkZ2T8W4OYZ36oBwF9hw+SpJHXDE15CHyFiA8A@mail.gmail.com>
Hello,

git archive --remote="URL" branchname > branchname.tar.gz is not reading .gitattributes file from the given branch but from HEAD. More specifically export-ignore lines in the target branch are ignored.

The remote is using git protocol and it's served by Gitlab. I use git version 2.11.0.

Is this a git issue? In that case is this a bug or a known limitation?

Best regards, Aalex Gabi

Next: Brandon Williams
Message 1 of 2 in “Git attributes are read from head branch instead of given branch when using git archive”
  1. Aalex GabiMar 9, 2017
  2. Brandon WilliamsMar 9, 2017

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.