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

Re: [PATCH] fix attribute handling in bare repositories

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jun 9, 2008, 04:24 UTC
Message-ID
<fcaeb9bf0806082124m604e5280o55bd0fef39345ad1@mail.gmail.com>
In-Reply-To
<7vskvnirjm.fsf@gitster.siamese.dyndns.org>
On Mon, Jun 9, 2008 at 3:46 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
>
>> Nguyen Thai Ngoc Duy schrieb:
>>> Hi,
>>>
>>> Currently attr.c will read .gitattributes on disk no matter there is a
>>> real worktree or not. This can lead to strange behavior.
>>
>> Yes, it probably shouldn't do that.  What about this patch?
>
> Hmm.  I do not know if it breaks anything, but if you are indeed in a bare
> repository, the files the codepaths affected try to read would not exist
> anyway, so I am not sure what this would fix, other than changing the
> behaviour of check-attr from noticing that it was asked for nonsense and
> bail out to not noticing nor saying anything useful.

Yes. But just in case those .gitattributes exist by accident (for example you access a bare repository from a worktree of another repository). I don't want to check cwd for .gitattributes everytime I want to use git-archive :)

Anyway if I do "git-archive <commit>" it should read .gitattributes from that commit, not from working directory.

-- 
Duy
Previous: René Scharfe
Message 8 of 8 in “git-archive and unwanted .gitattributes”
  1. Nguyen Thai Ngoc DuyJun 7, 2008
  2. Jakub NarebskiJun 7, 2008
  3. Nguyen Thai Ngoc DuyJun 7, 2008
  4. René ScharfeJun 8, 2008
  5. fix attribute handling in bare repositoriesRené Scharfe, Jun 8, 2008
  6. Junio C HamanoJun 8, 2008
  7. René ScharfeJun 8, 2008
  8. Nguyen Thai Ngoc DuyJun 9, 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.