From 34593aaec01ac68f8f5b75a43a5c097db3769fbe Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 12 May 2015 17:00:25 -0400 Subject: [PATCH] attr: declare variable at top of block for msvc --- src/attr_file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/attr_file.c b/src/attr_file.c index dcf54fdd4..89706865a 100644 --- a/src/attr_file.c +++ b/src/attr_file.c @@ -396,6 +396,8 @@ bool git_attr_fnmatch__match( } if ((match->flags & GIT_ATTR_FNMATCH_DIRECTORY) && !path->is_dir) { + bool samename; + /* for attribute checks or root ignore checks, fail match */ if (!(match->flags & GIT_ATTR_FNMATCH_IGNORE) || path->basename == path->path) @@ -404,7 +406,7 @@ bool git_attr_fnmatch__match( flags |= FNM_LEADING_DIR; /* fail match if this is a file with same name as ignored folder */ - bool samename = (match->flags & GIT_ATTR_FNMATCH_ICASE) ? + samename = (match->flags & GIT_ATTR_FNMATCH_ICASE) ? !strcasecmp(match->pattern, relpath) : !strcmp(match->pattern, relpath);