unsigned char updated;
unsigned char old_sha1[20];
unsigned char new_sha1[20];
- char ref_name[];
+ char ref_name[0];
};
static struct command *commands = NULL;
char new_hex[60], *old_hex, *lock_name;
int newfd, namelen, written;
+ if (!strncmp(name, "refs/", 5) && check_ref_format(name + 5))
+ return error("refusing to create funny ref '%s' locally",
+ name);
+
namelen = strlen(name);
lock_name = xmalloc(namelen + 10);
memcpy(lock_name, name, namelen);