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

Re: [PATCH] git-archive documentation: .gitattributes must be committed

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Feb 10, 2010, 20:00 UTC
Message-ID
<4B731043.6010108@lsrfire.ath.cx>
In-Reply-To
<7v1vgsao21.fsf@alter.siamese.dyndns.org>
Am 10.02.2010 20:27, schrieb Junio C Hamano:
Show 20 quoted lines
> René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
> 
>>> +The .gitattributes file must be present in the named tree for it to take
>>> +effect. Uncommitted attributes will not be considered in exports.
>>> +
>>>  EXAMPLES
>>>  --------
>>>  git archive --format=tar --prefix=junk/ HEAD | (cd /var/tmp/ && tar xf -)::
>>
>> Yeah, the description of --worktree-attributes is a bit terse.  The
>> lines you add make it appear almost as if this switch doesn't exist,
>> though; perhaps add a "unless --worktree-attributes is given" or similar
>> to one of the new sentences?
> 
> My impression has always been that people use attributes with archive more
> often to _tweak_ how the archive is produced after the fact, and they do
> so by modifying checked out .gitattributes (or $GIT_DIR/info/attributes)
> than allowing a possibly stale .gitattributes file etched in stone^Wtree
> being archived.  So in that sense, probably --worktree-attributes should
> have been the default.

That was the case up to ba053ea9 (April 2009, archive: do not read .gitattributes in working directory). I think that the current behaviour makes sense because it provides a repeatable default.

René
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 8 in “git-archive documentation: .gitattributes must be committed”
  1. git-archive documentation: .gitattributes must be committedFrancois Marier, Feb 10, 2010
  2. René ScharfeFeb 10, 2010
  3. Junio C HamanoFeb 10, 2010
  4. Junio C HamanoFeb 10, 2010
  5. René ScharfeFeb 10, 2010
  6. Junio C HamanoFeb 10, 2010
  7. Junio C HamanoFeb 10, 2010
  8. Francois MarierFeb 11, 2010

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.