From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org, Samuel Tardieu <sam@rfc1149.net>
Subject: Re: [PATCH] Permit refspec source side to parse as a sha1
Date: Thu, 20 Mar 2008 21:50:42 -0700 [thread overview]
Message-ID: <7vabksu1ct.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7v4pb0vhrg.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Thu, 20 Mar 2008 21:10:59 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> I really think we cannot afford piling hacks on top of hacks to hide the
> broken interface forever. We have two different things to validate, and
> the callers all know what they have when calling us to validate. We
> should not have a single loose validation that only catches "it cannot be
> either fetch nor push refspec" breakage.
> ...
> But at least I think something like this patch would lead us in the right
> direction.
On top of the one I sent out, with this patch, you can:
$ git push other ':/remote show:refs/heads/new'
to send the commit you would review with "git show ':/remote show'".
---
builtin-send-pack.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index 930e0fb..bb9c33a 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -537,7 +537,7 @@ static void verify_remote_names(int nr_heads, const char **heads)
int i;
for (i = 0; i < nr_heads; i++) {
- const char *remote = strchr(heads[i], ':');
+ const char *remote = strrchr(heads[i], ':');
remote = remote ? (remote + 1) : heads[i];
switch (check_ref_format(remote)) {
next prev parent reply other threads:[~2008-03-21 4:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-21 0:54 [PATCH] Permit refspec source side to parse as a sha1 Daniel Barkalow
2008-03-21 4:10 ` Junio C Hamano
2008-03-21 4:50 ` Junio C Hamano [this message]
2008-03-21 5:09 ` Daniel Barkalow
2008-03-21 5:30 ` Junio C Hamano
2008-03-21 5:57 ` Daniel Barkalow
2008-03-21 6:26 ` Junio C Hamano
2008-03-21 16:08 ` Daniel Barkalow
2008-03-21 22:17 ` [PATCH] remote.c: Fix overtight refspec validation Junio C Hamano
2008-03-21 23:12 ` Daniel Barkalow
2008-03-21 23:59 ` Junio C Hamano
2008-03-22 0:36 ` Daniel Barkalow
2008-03-22 19:48 ` Junio C Hamano
2008-03-22 20:45 ` Daniel Barkalow
2008-03-26 1:45 ` Linus Torvalds
2008-03-26 3:31 ` Junio C Hamano
2008-03-26 4:11 ` Junio C Hamano
2008-03-26 5:42 ` Daniel Barkalow
2008-03-26 5:46 ` Junio C Hamano
2008-03-26 6:22 ` Jeff King
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=7vabksu1ct.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=sam@rfc1149.net \
/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).