All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Pavel Roskin <proski@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-remote: support remotes with a dot in the name
Date: Tue, 20 Feb 2007 22:18:55 -0800	[thread overview]
Message-ID: <7vfy90t4mo.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070221004631.q4npyww808k88s0o@webmail.spamcop.net> (Pavel Roskin's message of "Wed, 21 Feb 2007 00:46:31 -0500")

Pavel Roskin <proski@gnu.org> writes:

> On the other hand, I've been tracking "wireless-2.6" for months without even
> realizing that the name could be a problem.

Ah, sorry.  You are absolutely right.  Using wireless-2.6 to
name wireless-2.6 repository (or linux-2.6 to name linux-2.6
repository) makes perfect sense.

>> I do not strongly oppose to allowing it now, but I suspect this
>> is probably less impact:
>>
>> 	if (/^remote\.(\S+?)\.([^.\s]+)\s+(.*)$/) {
>>         	...
>> 	}
>>
>> With this, we disallow whitespaces in remote names, but we leave
>> the door open for supporting variables other than fetch and url
>> by accepting the third token that matches any sequence of
>> non-dot, non-whitespace letters.
>
> It would be great as long as we don't use names with more than
> one dot after the remote name
> (e.g. remote.wireless-2.6.url.push),...

Do you mean:

	[remote "wireless-2.6.url"]
		url = wire.less:/repo/sito/ry.git
        	fetch = +refs/heads/*:refs/remotes/wireless-2.6.url/*

If so I think my replacement would match it.  It will be
returned from "git config --get-regexp '^remote\.'"  like this:

remote.wireless-2.6.url.url wire.less:/repo/sito/ry.git
remote.wireless-2.6.url.fetch +refs/heads/*:refs/remotes/wireless-2.6.url/*

and in:

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

$1 would match shortest non-whitespace sequence after "remote.",
$2 would match longuest non-dot, non-whitespace sequence before
a sequence of whitespaces, and
$3 would match everything after that sequence of whitespaces.

So, $1 = "wireless-2.6.url", $2 = "url", $3 = "wire.less:/repo/sito/ry.git"
or $1 = "wireless-2.6.url", $2 = "fetch", $3 = "+refs/heads/...."

But my Perl is rusty, so please double check it.

  reply	other threads:[~2007-02-21  6:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21  5:03 [PATCH] git-remote: support remotes with a dot in the name Pavel Roskin
2007-02-21  5:21 ` Junio C Hamano
2007-02-21  5:46   ` Pavel Roskin
2007-02-21  6:18     ` Junio C Hamano [this message]
2007-02-21  7:12       ` Pavel Roskin
2007-02-21  7:29         ` Shawn O. Pearce
2007-02-21  7:32         ` Junio C Hamano
2007-02-21 10:21       ` Theodore Tso

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=7vfy90t4mo.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=proski@gnu.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.