From: Jeff King <peff@peff.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: David Bryson <david@statichacks.org>, git@vger.kernel.org
Subject: Re: error pushing stash ?
Date: Tue, 28 Oct 2008 17:23:28 -0400 [thread overview]
Message-ID: <20081028212327.GA25358@sigill.intra.peff.net> (raw)
In-Reply-To: <20081028211755.GA8074@sigill.intra.peff.net>
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
next prev parent reply other threads:[~2008-10-28 21:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 0:34 error pushing stash ? David Bryson
2008-10-07 0:40 ` Shawn O. Pearce
2008-10-28 21:17 ` Jeff King
2008-10-28 21:23 ` Jeff King [this message]
2008-11-06 3:33 ` [PATCH] Added test case for mirror to not push stash refs david
2008-11-06 8:34 ` Sverre Rabbelier
2008-11-06 16:58 ` Junio C Hamano
2008-11-06 17:39 ` david
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081028212327.GA25358@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=david@statichacks.org \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).