Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-05-15 16:56:50 +0300
committerJeff King <peff@peff.net>2018-05-22 06:50:11 +0300
commit641084b618ddbe099f0992161988c3e479ae848b (patch)
tree2a7e0bcf72c6477e605093c6f0ba2f972e3670d8 /read-cache.c
parente19e5e66d691bdeeeb5e0ed2ffcecdd7666b0d7b (diff)
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 <peff@peff.net>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c5
1 files changed, 4 insertions, 1 deletions
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':