Re: error pushing stash ?
From: Jeff King <hidden>
Date: 2016-06-15 22:45:32
On Tue, Oct 28, 2008 at 05:17:55PM -0400, Jeff King wrote:
Since no version of receive-pack accepts these "funny refs", perhaps we should mirror the check when considering the list of refs to send. IOW, don't even make them eligible for matching or mirroring. Patch is below. [...] + /* we already know it starts with refs/ to get here */ + if (check_ref_format(refname + 5)) + return 0;
It occurs to me that since I didn't give a good commit message, and
since I replied to a several-weeks-old message, this might be confusing.
But what I am suggesting is that git-push should not bother trying to
send something that it knows git-receive-pack will refuse. So this check
goes into builtin-send-pack.c, and is an exact mirror of the one in
builtin-receive-pack.c:
$ sed -n 177,181p builtin-receive-pack.c
/* 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";
}
-Peff