Re: [PATCH 1/7] read info/{attributes,exclude} only when in repository

2016-10-25 Thread Jeff King
On Tue, Oct 25, 2016 at 07:24:50PM +0700, Duy Nguyen wrote: > > Let's detect this situation explicitly and skip reading the > > file (i.e., the same behavior we'd get if we were in a > > repository and the file did not exist). > > On the other hand, if we invoke attr machinery too early by mistak

Re: [PATCH 1/7] read info/{attributes,exclude} only when in repository

2016-10-25 Thread Duy Nguyen
On Thu, Oct 20, 2016 at 1:16 PM, Jeff King wrote: > The low-level attribute and gitignore code will try to look > in $GIT_DIR/info for any repo-level configuration files, > even if we have not actually determined that we are in a > repository (e.g., running "git grep --no-index"). In such a > case

[PATCH 1/7] read info/{attributes,exclude} only when in repository

2016-10-19 Thread Jeff King
The low-level attribute and gitignore code will try to look in $GIT_DIR/info for any repo-level configuration files, even if we have not actually determined that we are in a repository (e.g., running "git grep --no-index"). In such a case they end up looking for ".git/info/attributes", etc. This i