git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-remote: support remotes with a dot in the name

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 21, 2007, 07:29 UTC
Message-ID
<20070221072921.GB28152@spearce.org>
In-Reply-To
<20070221021206.8onspw0840gcs8ck@webmail.spamcop.net>
Pavel Roskin <proski@gnu.org> wrote:
Show 5 quoted lines
> I was thinking of something like
> 
> [remote "wireless-2.6"]
> url = http://foo/bar
> url.push = ssh://foo/bar
The key `url.push` is not a valid string in a config file.
 
> > But my Perl is rusty, so please double check it.
FWIW Junio's pattern looks OK to me.
> The "(\S*?)" construct looks weird (you probably meant to use "(\S*)" for the
> remote name), but the rest is probably OK.  I'll send the "double-checked"
> patch tomorrow unless you beat me at that.

The use of (\S+?) here is right. We want to be non-greedy in our matching of the remote name, as we don't want to overslurp and grab through the key name and part of the key value into the remote name by mistake, especially if the key value contained spaces.

-- 
Shawn.
Previous: Pavel RoskinNext: Junio C Hamano
Message 6 of 8 in “git-remote: support remotes with a dot in the name”
  1. git-remote: support remotes with a dot in the namePavel Roskin, Feb 21, 2007
  2. Junio C HamanoFeb 21, 2007
  3. Pavel RoskinFeb 21, 2007
  4. Junio C HamanoFeb 21, 2007
  5. Pavel RoskinFeb 21, 2007
  6. Shawn O. PearceFeb 21, 2007
  7. Junio C HamanoFeb 21, 2007
  8. Theodore TsoFeb 21, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.