diff --relative: output paths as relative to the current subdirectory
[gitweb.git] / receive-pack.c
index d0a563df6457a6fc5b40b3502582a78fafdadd53..326749583221d0f5e81f58608a23ab1dc1601177 100644 (file)
@@ -165,7 +165,8 @@ static const char *update(struct command *cmd)
        unsigned char *new_sha1 = cmd->new_sha1;
        struct ref_lock *lock;
 
-       if (!prefixcmp(name, "refs/") && check_ref_format(name + 5)) {
+       /* only refs/... are allowed */
+       if (prefixcmp(name, "refs/") || check_ref_format(name + 5)) {
                error("refusing to create funny ref '%s' remotely", name);
                return "funny refname";
        }