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

Re: [BUG?] git-archive ignores remote .gitattributes (was: .git/info/attributes not cloned)

From
Jeff King <peff@peff.net>
Date
Mar 31, 2008, 02:47 UTC
Message-ID
<20080331024755.GA690@coredump.intra.peff.net>
In-Reply-To
<alpine.LSU.1.00.0803281321260.18259@racer.site>
On Fri, Mar 28, 2008 at 01:22:53PM +0100, Johannes Schindelin wrote:
Show 12 quoted lines
> > "git-archive --remote=/some/repo" will ignore /some/repo/.gitattributes, 
> > but check /some/repo/info/attributes.
> > 
> > I think the problem is in the loop that looks for .gitattributes, which 
> > seems to do so by taking the current path and iterating down through it?
> 
> The problem is that "git archive --remote" operates on the remote 
> repository as if it were bare.  Which in many cases is true.
> 
> So I'd submit that this is not the usage .gitattributes is meant for, and 
> that you should clone the thing if you want to generate archives heeding 
> the .gitattributes.

I don't think it makes sense to operate on or take input from the working tree of a remote; no other other command does, I don't think. I had assumed, though, that .gitattributes files _in the tree being exported_ would be used.

I thought there was some discussion of that a while ago (or possibly of looking up .gitignore in the same way).

-Peff
Previous: Johannes SchindelinNext: Junio C Hamano
Message 11 of 13 in “.git/info/attributes not cloned”
  1. Toby CorkindaleMar 27, 2008
  2. Jeff KingMar 27, 2008
  3. Toby CorkindaleMar 27, 2008
  4. Jeff KingMar 27, 2008
  5. Toby CorkindaleMar 27, 2008
  6. Jeff KingMar 27, 2008
  7. [BUG?] git-archive ignores remote .gitattributes (was: .git/info/attributes not cloned)Toby Corkindale, Mar 28, 2008
  8. Johannes SchindelinMar 28, 2008
  9. Jakub NarebskiMar 28, 2008
  10. Johannes SchindelinMar 28, 2008
  11. Jeff KingMar 31, 2008
  12. Junio C HamanoMar 31, 2008
  13. Toby CorkindaleApr 10, 2008

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.