summaryrefslogtreecommitdiffstats
path: root/t/helper/test-scrap-cache-tree.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-10-20 08:16:41 +0200
committerJunio C Hamano <gitster@pobox.com>2016-10-26 22:30:51 +0200
commitf0056f6419deb6b4e226976c571f6429875519f1 (patch)
treea24ea4c1759b100554fa832b1f6739dcc18405ae /t/helper/test-scrap-cache-tree.c
parentEleventh batch for 2.11 (diff)
downloadgit-f0056f6419deb6b4e226976c571f6429875519f1.tar.xz
git-f0056f6419deb6b4e226976c571f6429875519f1.zip
read info/{attributes,exclude} only when in repository
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 is generally harmless, as such a file is unlikely to exist outside of a repository, but it's still conceptually the wrong thing to do. 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). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions