Code

Forbid DEL characters in reference names
[git.git] / refs.c
diff --git a/refs.c b/refs.c
index e3c05110e58ca5684f9c43b1e1a5eb2587c96828..6f471d42c37ab4e66f402d1c983d3d42e4ebb2d8 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -837,7 +837,7 @@ int for_each_rawref(each_ref_fn fn, void *cb_data)
 
 static inline int bad_ref_char(int ch)
 {
-       if (((unsigned) ch) <= ' ' ||
+       if (((unsigned) ch) <= ' ' || ch == 0x7f ||
            ch == '~' || ch == '^' || ch == ':' || ch == '\\')
                return 1;
        /* 2.13 Pattern Matching Notation */