On Mon, Jun 9, 2008 at 3:46 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:> René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> 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 (forexample you access a bare repository from a worktree of anotherrepository). I don't want to check cwd for .gitattributes everytime Iwant to use git-archive :) Anyway if I do "git-archive <commit>" it should read .gitattributesfrom that commit, not from working directory.-- Duy��.n��������+%������w��{.n��������n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�m