Subject: Re: [PATCH v2 2/2] grep: stop looking at random places for .gitattributes

From: Johannes Sixt <[email-masked]>
Date: Thu, 11 Oct 2012 07:45:00 +0200

Am 10/10/2012 21:56, schrieb Junio C Hamano:
> Johannes Sixt <[email-masked]> writes:
> 
>> At any rate, I don't observe the warnings anymore with this series.
> 
> What kind of warnings have you been getting?  Earlier we had a bug
> in the jk/config-warn-on-inaccessible-paths series that made it warn
> when we tried to open a .gitattribute file and open() returned an
> error other than ENOENT.  The bug was that we saw unnecessary errors
> when a directory that used to exist no longer exists in the working
> tree; we would instead get ENOTDIR in such a case that needs to be
> ignored.

I saw EINVAL errors when 'git grep pattern rev' was run on Windows. The
reason is that the code attempted to access "rev:dir/.gitattributes" in
the worktree, which is an invalid path on Windows due to the colon. The
lack of this warning indicates that the attempts to access these files are
eliminated.

-- Hannes