Change check_refname_format() to reject unnormalized refnames
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index 5a0bd0f7af35334a1daf469178e4e5e4f4063906..d2aac24a366f946ea5a256a7bc47f10d36f98a88 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -908,9 +908,6 @@ int check_refname_format(const char *ref, int flags)
        int component_len, component_count = 0;
 
        while (1) {
-               while (*ref == '/')
-                       ref++; /* tolerate leading and repeated slashes */
-
                /* We are at the start of a path component. */
                component_len = check_refname_component(ref);
                if (component_len < 0) {