All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Daniel Barkalow <barkalow@iabervon.org>,
	git@vger.kernel.org, Samuel Tardieu <sam@rfc1149.net>
Subject: Re: [PATCH] remote.c: Fix overtight refspec validation
Date: Tue, 25 Mar 2008 20:31:49 -0700	[thread overview]
Message-ID: <7vod92jh3u.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0803251841420.2775@woody.linux-foundation.org> (Linus Torvalds's message of "Tue, 25 Mar 2008 18:45:25 -0700 (PDT)")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Fri, 21 Mar 2008, Junio C Hamano wrote:
>>
>> We tightened the refspec validation code in an earlier ef00d15 (Tighten
>> refspec processing, 2008-03-17) per my suggestion, but the suggestion was
>> misguided to begin with and it broke this usage:
>
> It seems to have also broken "git push --tags".
>
> I now get 
>
> 	fatal: Invalid refspec 'refs/tags/*'
>
> which seems a bit sad.

Yeah that indeed is very sad.  Given that Andrew identified another
regression on the fetch side today, I am beginning to suspect that 1.5.4
was still too early to merge the C rewrite.  On the other hand, until we
tag, new features are not tested in the field, so...

Especially that "refs/tags/*" is sad in that it is leaking an internal
implementation detail.  I do not think the original code ever used
wildcards on the push side, and it probably was a good idea to allow
wildcards when the code was rewritten.

In any case, this should fix it.

 builtin-push.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-push.c b/builtin-push.c
index b68c681..5316d6d 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -120,7 +120,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
 	if (verbose)
 		flags |= TRANSPORT_PUSH_VERBOSE;
 	if (tags)
-		add_refspec("refs/tags/*");
+		add_refspec("refs/tags/*:refs/tags/*");
 	if (all)
 		flags |= TRANSPORT_PUSH_ALL;
 	if (mirror)

  reply	other threads:[~2008-03-26  3:32 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
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 [this message]
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=7vod92jh3u.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=sam@rfc1149.net \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.