{"thread":{"id":"6906","subject":"[PATCH 1.5.0.1.37] fix git-remote inconsistent about use of dots in remote names","startedAt":"2007-02-21T08:30:42Z","lastAt":"2007-02-21T10:04:01Z","messageCount":4,"participants":["Bart Trojanowski","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"35168","messageId":"20070221083042.GE23952@jukie.net","threadId":"6906","inReplyTo":null,"subject":"[PATCH 1.5.0.1.37] fix git-remote inconsistent about use of dots in remote names","fromName":"Bart Trojanowski","fromEmail":"bart@jukie.net","sentAt":"2007-02-21T08:30:42Z","receivedAt":"2007-02-21T08:30:42Z","isPatch":true,"sender":{"key":"bart@jukie.net","avatar":"https://avatars.githubusercontent.com/u/6721?v=4"},"body":"Hi,\n\nI was trying to setup a git repository to use as a site 'alternative'\nrepo for various kernel projects.\n\nI am currently using one with the .git/remotes/* method of specifying\nremotes, but I decided to convert to .git/config method because of\ngit-remote update.\n\nSo here is what I am doing\n\n$ git version\ngit version 1.5.0.1.37.g1e592\n\n$ mkdir cache.git\n$ cd cache.git\n$ git init-db\n\n$ git remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n$ git remote add v2.6.15.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.15.y.git\n$ git remote add v2.6.16.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git\n$ git remote add v2.6.17.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.17.y.git \n$ git remote add v2.6.18.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.18.y.git\n$ git remote add v2.6.19.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.19.y.git\n$ git remote add v2.6.20.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git\n\n$ git remote \nlinus\nv2\n\n$ git remote update\nFetching linus\n...\nFetching v2\nfatal: 'v2': unable to chdir or not a git archive\nfatal: The remote end hung up unexpectedly\nCannot get the repository state from v2\nfetch v2: command returned error: 1\n\nThe problem seems obvious.  I have dots in my remote names, and\ngit-remote uses git-config to read the configuration.\n\nFix below.\n\n-Bart\n\n>From 781fc372ee0861fb93a3f97ac3b81a1dca823bf1 Mon Sep 17 00:00:00 2001\nFrom: Bart Trojanowski <bart@jukie.net>\nDate: Wed, 21 Feb 2007 03:28:01 -0500\nSubject: [PATCH] allow git-remote to parse out names with periods in them\n\nSigned-off-by: Bart Trojanowski <bart@jukie.net>\n---\n git-remote.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-remote.perl b/git-remote.perl\nindex 6e473ec..f8f9ee7 100755\n--- a/git-remote.perl\n+++ b/git-remote.perl\n@@ -67,7 +67,7 @@ sub list_remote {\n \t\t$git->command(qw(config --get-regexp), '^remote\\.');\n \t};\n \tfor (@remotes) {\n-\t\tif (/^remote\\.([^.]*)\\.(\\S*)\\s+(.*)$/) {\n+\t\tif (/^remote\\.(.+)\\.url\\s+(.*)$/) {\n \t\t\tadd_remote_config(\\%seen, $1, $2, $3);\n \t\t}\n \t}\n-- \n1.5.0.1.37.g1e592\n"},{"id":"35169","messageId":"20070221085422.GF23952@jukie.net","threadId":"6906","inReplyTo":"20070221083042.GE23952@jukie.net","subject":"Re: [PATCH 1.5.0.1.37] fix git-remote inconsistent about use of dots in remote names","fromName":"Bart Trojanowski","fromEmail":"bart@jukie.net","sentAt":"2007-02-21T08:54:22Z","receivedAt":"2007-02-21T08:54:22Z","isPatch":true,"sender":{"key":"bart@jukie.net","avatar":"https://avatars.githubusercontent.com/u/6721?v=4"},"body":"After testing some more I noticed that I broke git-remote show.\n\n> --- a/git-remote.perl\n> +++ b/git-remote.perl\n> @@ -67,7 +67,7 @@ sub list_remote {\n>  \t\t$git->command(qw(config --get-regexp), '^remote\\.');\n>  \t};\n>  \tfor (@remotes) {\n> -\t\tif (/^remote\\.([^.]*)\\.(\\S*)\\s+(.*)$/) {\n> +\t\tif (/^remote\\.(.+)\\.url\\s+(.*)$/) {\n\nThe patch bellow seems to be better.\n\n-Bart\n\n>From 9cb44ff2d1d395491cde8c3d5787b35c93c4ad12 Mon Sep 17 00:00:00 2001\nFrom: Bart Trojanowski <bart@jukie.net>\nDate: Wed, 21 Feb 2007 03:54:17 -0500\nSubject: [PATCH] allow git-remote to parse out names with periods in them\n\nSigned-off-by: Bart Trojanowski <bart@jukie.net>\n---\n git-remote.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-remote.perl b/git-remote.perl\nindex 6e473ec..6087a9d 100755\n--- a/git-remote.perl\n+++ b/git-remote.perl\n@@ -67,7 +67,7 @@ sub list_remote {\n \t\t$git->command(qw(config --get-regexp), '^remote\\.');\n \t};\n \tfor (@remotes) {\n-\t\tif (/^remote\\.([^.]*)\\.(\\S*)\\s+(.*)$/) {\n+\t\tif (/^remote\\.(.+)\\.([^.]+)\\s+(.*)$/) {\n \t\t\tadd_remote_config(\\%seen, $1, $2, $3);\n \t\t}\n \t}\n-- \n1.5.0.1.37.g1e592-dirty\n"},{"id":"35171","messageId":"7vabz7sw69.fsf@assigned-by-dhcp.cox.net","threadId":"6906","inReplyTo":"20070221085422.GF23952@jukie.net","subject":"Re: [PATCH 1.5.0.1.37] fix git-remote inconsistent about use of dots in remote names","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-21T09:21:34Z","receivedAt":"2007-02-21T09:21:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This is what I have currently queued -- please see earlier\ndiscussion with Pavel on the list.\n\n-- >8 --\nFrom: Pavel Roskin <proski@gnu.org>\nDate: Wed, 21 Feb 2007 00:03:36 -0500\nSubject: [PATCH] git-remote: support remotes with a dot in the name\n\n[jc: the original from Pavel was limiting the variable names to only\n fetch and url, but I loosened it to take valid variable names.]\n\nSigned-off-by: Pavel Roskin <proski@gnu.org>\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n git-remote.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-remote.perl b/git-remote.perl\nindex 61244e9..bd70bf1 100755\n--- a/git-remote.perl\n+++ b/git-remote.perl\n@@ -67,7 +67,7 @@ sub list_remote {\n \t\t$git->command(qw(config --get-regexp), '^remote\\.');\n \t};\n \tfor (@remotes) {\n-\t\tif (/^remote\\.([^.]*)\\.(\\S*)\\s+(.*)$/) {\n+\t\tif (/^remote\\.(\\S+?)\\.([^.\\s]+)\\s+(.*)$/) {\n \t\t\tadd_remote_config(\\%seen, $1, $2, $3);\n \t\t}\n \t}\n-- \n1.5.0.1.587.g8493\n"},{"id":"35179","messageId":"loom.20070221T110309-315@post.gmane.org","threadId":"6906","inReplyTo":"7vabz7sw69.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1.5.0.1.37] fix git-remote inconsistent about use of dots in remote names","fromName":"Bart Trojanowski","fromEmail":"bart@jukie.net","sentAt":"2007-02-21T10:04:01Z","receivedAt":"2007-02-21T10:04:01Z","isPatch":true,"sender":{"key":"bart@jukie.net","avatar":"https://avatars.githubusercontent.com/u/6721?v=4"},"body":"Junio C Hamano <junkio <at> cox.net> writes:\n>\n> This is what I have currently queued -- please see earlier\n> discussion with Pavel on the list.\n\nThanks Junio.  I am now subscribed to the list :)\n\n-Bart\n"}]}