git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <paolo.bonzini@lu.unisi.ch>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Paul Collins <paul@briny.ondioline.org>, git@vger.kernel.org
Subject: Re: git-remote and remotes with '.' in their names
Date: Wed, 28 Feb 2007 16:14:15 +0100	[thread overview]
Message-ID: <45E59C47.9000001@lu.unisi.ch> (raw)
In-Reply-To: <Pine.LNX.4.63.0702281607220.22628@wbgn013.biozentrum.uni-wuerzburg.de>

Johannes Schindelin wrote:
> Hi,
> 
> On Wed, 28 Feb 2007, Paolo Bonzini wrote:
> 
>> Hello,
>>
>>>  	for (@remotes) {
>>> -		if (/^remote\.([^.]*)\.(\S*)\s+(.*)$/) {
>>> +		if (/^remote\.(.*)\.(\S*)\s+(.*)$/) {
>> You probably want either
>>
>> +		if (/^remote\.(\S*)\.(\S*)\s+(.*)$/) {
>>
>> or
>>
>> +		if (/^remote\.(\S*)\.([^.]*)\s+(.*)$/) {
> 
> Did you mean to prevent the remote starting with a dot? IMHO that would be 
> a good change, but AFAIS both your proposals don't do that.

No, I meant to avoid the ".*" in Paul's proposal.  They should be in 
practice equivalent but, with the second one, I made the regex more 
readable: it is clearer that the $3 variable is not meant to include dots.

Your proposal makes sense to me -- that would be

+		if (/^remote\.([^.]\S*)\.([^.]*)\s+(.*)$/) {

Paolo

      reply	other threads:[~2007-02-28 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26  7:36 git-remote and remotes with '.' in their names Paul Collins
2007-02-26 11:28 ` Jakub Narebski
2007-02-26 11:28 ` Johannes Schindelin
2007-02-28 14:55 ` Paolo Bonzini
2007-02-28 15:10   ` Johannes Schindelin
2007-02-28 15:14     ` Paolo Bonzini [this message]

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=45E59C47.9000001@lu.unisi.ch \
    --to=paolo.bonzini@lu.unisi.ch \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=paul@briny.ondioline.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).