From: Nguyễn Thái Ngọc Duy Date: Tue, 16 Feb 2010 16:05:05 GMT Subject: [WIP PATCH 14/26] Do not try to read $GIT_DIR/info/attributes if there is no repository Message-ID: <1266336317-607-15-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 --- attr.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/attr.c b/attr.c index f5346ed..f1362de 100644 --- a/attr.c +++ b/attr.c @@ -480,7 +480,10 @@ static void bootstrap_attr_stack(void) debug_push(elem); } - elem = read_attr_from_file(git_path(INFOATTRIBUTES_FILE), 1); + if (!startup_info || startup_info->have_repository) + elem = read_attr_from_file(git_path(INFOATTRIBUTES_FILE), 1); + else + elem = NULL; if (!elem) elem = xcalloc(1, sizeof(*elem)); elem->origin = NULL; -- 1.7.0.195.g637a2