Skip to content

Commit 641084b

Browse files
committed
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 <[email protected]>
1 parent e19e5e6 commit 641084b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

read-cache.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,10 @@ static int verify_dotfile(const char *rest)
810810

811811
switch (*rest) {
812812
/*
813-
* ".git" followed by NUL or slash is bad.
813+
* ".git" followed by NUL or slash is bad. Note that we match
814+
* case-insensitively here, even if ignore_case is not set.
815+
* This outlaws ".GIT" everywhere out of an abundance of caution,
816+
* since there's really no good reason to allow it.
814817
*/
815818
case 'g':
816819
case 'G':

0 commit comments

Comments
 (0)