From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
git@vger.kernel.org,
Daniel Barkalow <barkalow@iabervon.iabervon.org>
Subject: Re: [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs
Date: Thu, 23 Jul 2015 10:13:45 -0700 [thread overview]
Message-ID: <xmqq1tfyre46.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqa8umrfge.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Thu, 23 Jul 2015 09:44:49 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Will squash the changes; no need to resend (unless people discover
> other issues; let's hope that I wouldn't be the one to do so ;-).
>
> Thanks.
>
>> diff --git i/t/t5511-refspec.sh w/t/t5511-refspec.sh
>> index de6db86ccff0..7bfca7962d41 100755
>> --- i/t/t5511-refspec.sh
>> +++ w/t/t5511-refspec.sh
>> @@ -71,11 +71,11 @@ test_refspec fetch ':refs/remotes/frotz/HEAD-to-me'
That was whitespace damaged, so I had to hand-tweak the file in
place. While at it, I noticed that we do not check a case where
multiple asterisks appear in a single component (which is rejected
for a reason different from having multiple components with an
asterisk in them), which also deserves its own test.
I'll squash in the following instead.
There is a slightly related tangent I noticed while doing so.
I wonder if there is an obvious and unambiguous interpretation of
what this command line wants to do:
$ git fetch origin refs/heads/*g*/for-linus:refs/remotes/i-*/mine
We _might_ want to allow one (and only one) component with more than
one asterisk on the LHS of a refspec, while requiring only one
asterisk on the RHS to allow "this '*g*' is just like '*' but
excluding things that do not have 'g' in it".
Or it may not be worth the additional complexity.
t/t5511-refspec.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/t/t5511-refspec.sh b/t/t5511-refspec.sh
index de6db86..f541f30 100755
--- a/t/t5511-refspec.sh
+++ b/t/t5511-refspec.sh
@@ -71,15 +71,18 @@ test_refspec fetch ':refs/remotes/frotz/HEAD-to-me'
test_refspec push ':refs/remotes/frotz/delete me' invalid
test_refspec fetch ':refs/remotes/frotz/HEAD to me' invalid
-test_refspec fetch 'refs/heads/*/for-linus:refs/remotes/mine/*-blah' invalid
-test_refspec push 'refs/heads/*/for-linus:refs/remotes/mine/*-blah' invalid
+test_refspec fetch 'refs/heads/*/for-linus:refs/remotes/mine/*-blah'
+test_refspec push 'refs/heads/*/for-linus:refs/remotes/mine/*-blah'
-test_refspec fetch 'refs/heads*/for-linus:refs/remotes/mine/*' invalid
-test_refspec push 'refs/heads*/for-linus:refs/remotes/mine/*' invalid
+test_refspec fetch 'refs/heads*/for-linus:refs/remotes/mine/*'
+test_refspec push 'refs/heads*/for-linus:refs/remotes/mine/*'
test_refspec fetch 'refs/heads/*/*/for-linus:refs/remotes/mine/*' invalid
test_refspec push 'refs/heads/*/*/for-linus:refs/remotes/mine/*' invalid
+test_refspec fetch 'refs/heads/*g*/for-linus:refs/remotes/mine/*' invalid
+test_refspec push 'refs/heads/*g*/for-linus:refs/remotes/mine/*' invalid
+
test_refspec fetch 'refs/heads/*/for-linus:refs/remotes/mine/*'
test_refspec push 'refs/heads/*/for-linus:refs/remotes/mine/*'
next prev parent reply other threads:[~2015-07-23 17:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 21:05 [PATCH v5 0/2] refs: cleanup and new behavior Jacob Keller
2015-07-22 21:05 ` [PATCH 1/2] refs: cleanup comments regarding check_refname_component Jacob Keller
2015-07-22 21:05 ` [PATCH 2/2] refs: loosen restriction on wildcard "*" refspecs Jacob Keller
2015-07-22 22:04 ` Junio C Hamano
2015-07-22 23:24 ` Jacob Keller
2015-07-23 16:44 ` Junio C Hamano
2015-07-23 16:51 ` Jacob Keller
2015-07-23 17:13 ` Junio C Hamano [this message]
2015-07-23 17:18 ` Jacob Keller
2015-07-23 22:00 ` Eric Sunshine
2015-07-23 22:12 ` Junio C Hamano
2015-07-24 0:45 ` Keller, Jacob E
2015-07-24 0:51 ` Junio C Hamano
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=xmqq1tfyre46.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=barkalow@iabervon.iabervon.org \
--cc=git@vger.kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jacob.keller@gmail.com \
/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.