From: Jeff King Date: Tue, 15 May 2018 13:56:50 +0000 (-0400) Subject: verify_dotfile: mention case-insensitivity in comment X-Git-Tag: v2.13.7~1^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/641084b618ddbe099f0992161988c3e479ae848b?ds=inline;hp=--cc verify_dotfile: mention case-insensitivity in comment We're more restrictive than we need to be in matching ".GIT" on case-sensitive filesystems; let's make a note that this is intentional. Signed-off-by: Jeff King --- 641084b618ddbe099f0992161988c3e479ae848b diff --git a/read-cache.c b/read-cache.c index 5c5dfc629d..333e0c5429 100644 --- a/read-cache.c +++ b/read-cache.c @@ -810,7 +810,10 @@ static int verify_dotfile(const char *rest) switch (*rest) { /* - * ".git" followed by NUL or slash is bad. + * ".git" followed by NUL or slash is bad. Note that we match + * case-insensitively here, even if ignore_case is not set. + * This outlaws ".GIT" everywhere out of an abundance of caution, + * since there's really no good reason to allow it. */ case 'g': case 'G':