X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=refs.c;h=fc33bc6ac4b4abcffd814afcd6ee76d4cc73c28c;hb=a4c2e69936df8dd0b071b85664c6cc6a4870dd84;hp=e65a3b4c4ef57863a1055108d2598777cabc2c8d;hpb=a8816e7bab0354badd915c1da09421a64c982831;p=git.git diff --git a/refs.c b/refs.c index e65a3b4c4..fc33bc6ac 100644 --- a/refs.c +++ b/refs.c @@ -682,12 +682,13 @@ int for_each_rawref(each_ref_fn fn, void *cb_data) * - it has ASCII control character, "~", "^", ":" or SP, anywhere, or * - it ends with a "/". * - it ends with ".lock" + * - it contains a "\" (backslash) */ static inline int bad_ref_char(int ch) { if (((unsigned) ch) <= ' ' || - ch == '~' || ch == '^' || ch == ':') + ch == '~' || ch == '^' || ch == ':' || ch == '\\') return 1; /* 2.13 Pattern Matching Notation */ if (ch == '?' || ch == '[') /* Unsupported */