From: Nguyễn Thái Ngọc Duy Date: Tue, 16 Feb 2010 16:05:02 GMT Subject: [WIP PATCH 11/26] Do not look for .git/info/exclude when gitdir is not set up Message-ID: <1266336317-607-12-git-send-email-pclouds@gmail.com> In-Reply-To: <1266336317-607-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- dir.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dir.c b/dir.c index 67c3af6..a8fcbce 100644 --- a/dir.c +++ b/dir.c @@ -1024,9 +1024,11 @@ void setup_standard_excludes(struct dir_struct *dir) const char *path; dir->exclude_per_dir = ".gitignore"; - path = git_path("info/exclude"); - if (!access(path, R_OK)) - add_excludes_from_file(dir, path); + if (!startup_info || startup_info->have_repository) { + path = git_path("info/exclude"); + if (!access(path, R_OK)) + add_excludes_from_file(dir, path); + } if (excludes_file && !access(excludes_file, R_OK)) add_excludes_from_file(dir, excludes_file); } -- 1.7.0.195.g637a2