{"thread":{"id":"2893","subject":"[PATCH] GIT: Support [address] in URLs","startedAt":"2005-12-21T10:23:42Z","lastAt":"2005-12-22T16:48:46Z","messageCount":13,"participants":["YOSHIFUJI Hideaki / 吉藤英明","Junio C Hamano","David S. Miller","Krzysztof Halasa","Daniel Barkalow"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"13862","messageId":"20051221.192342.132228413.yoshfuji@linux-ipv6.org","threadId":"2893","inReplyTo":null,"subject":"[PATCH] GIT: Support [address] in URLs","fromName":"YOSHIFUJI Hideaki / 吉藤英明","fromEmail":"yoshfuji@linux-ipv6.org","sentAt":"2005-12-21T10:23:42Z","receivedAt":"2005-12-21T10:23:42Z","isPatch":true,"sender":{"key":"yoshfuji@linux-ipv6.org","avatar":"https://gravatar.com/avatar/92c288bb8d3e34afd7bb1574cc1079a3d0aa6d36d80955d1ec6a1cea2868d392?d=mp&s=160"},"body":"Hello.\n\nAllow address enclosed by [] in URLs, like:\n   git push '[3ffe:ffff:...:1]:GIT/git'\nor\n   git push 'ssh://[3ffe:ffff:...:1]/GIT/git'\n\nSigned-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>\n\ndiff --git a/connect.c b/connect.c\nindex 93f6f80..49f93c6 100644\n--- a/connect.c\n+++ b/connect.c\n@@ -561,7 +561,8 @@ int git_connect(int fd[2], char *url, co\n {\n \tchar command[1024];\n \tchar *host, *path = url;\n-\tchar *colon = NULL;\n+\tchar *end;\n+\tint c;\n \tint pipefd[2][2];\n \tpid_t pid;\n \tenum protocol protocol = PROTO_LOCAL;\n@@ -571,15 +572,26 @@ int git_connect(int fd[2], char *url, co\n \t\t*host = '\\0';\n \t\tprotocol = get_protocol(url);\n \t\thost += 3;\n-\t\tpath = strchr(host, '/');\n-\t}\n-\telse {\n+\t\tc = '/';\n+\t} else {\n \t\thost = url;\n-\t\tif ((colon = strchr(host, ':'))) {\n-\t\t\tprotocol = PROTO_SSH;\n-\t\t\t*colon = '\\0';\n-\t\t\tpath = colon + 1;\n-\t\t}\n+\t\tc = ':';\n+\t}\n+\n+\tif (host[0] == '[') {\n+\t\tend = strchr(host + 1, ']');\n+\t\tif (end) {\n+\t\t\t*end = 0;\n+\t\t\tend++;\n+\t\t\thost++;\n+\t\t} else\n+\t\t\tend = host;\n+\t} else\n+\t\tend = host;\n+\n+\tif ((path = strchr(end, c)) && c == ':') {\n+\t\tprotocol = PROTO_SSH;\n+\t\t*path++ = '\\0';\n \t}\n \n \tif (!path || !*path)\n\n-- \nYOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>\nGPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA\n"},{"id":"13894","messageId":"7v64pi5c4t.fsf@assigned-by-dhcp.cox.net","threadId":"2893","inReplyTo":"20051221.192342.132228413.yoshfuji@linux-ipv6.org","subject":"Re: [PATCH] GIT: Support [address] in URLs","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-21T22:16:50Z","receivedAt":"2005-12-21T22:16:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"[somehow the first reply seems to have been lost]\n\nYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> writes:\n\n> Allow address enclosed by [] in URLs, like:\n>    git push '[3ffe:ffff:...:1]:GIT/git'\n> or\n>    git push 'ssh://[3ffe:ffff:...:1]/GIT/git'\n\nI am not familiar with how things are done in ipv6 land, but I\nwonder if the former is consistent with the existing practice.\n\nThat is, how does one do something like this, with an ipv6\nliteral address?\n\n\ttelnet 127.0.0.1 80\n\nIs it done like this\n\n\ttelnet '[::1]' 80\n\nor\n\ttelnet '::1' 80\n\nYour patch suggests the former, but I just wanted to make sure.\n\nThe latter \"ssh://[...]\" looks like RFC 3986, and I do not have\nproblems with.\n"},{"id":"13896","messageId":"20051222.072045.31468866.yoshfuji@linux-ipv6.org","threadId":"2893","inReplyTo":"7vr7866uww.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] GIT: Support [address] in URLs","fromName":"YOSHIFUJI Hideaki / 吉藤英明","fromEmail":"yoshfuji@linux-ipv6.org","sentAt":"2005-12-21T22:20:45Z","receivedAt":"2005-12-21T22:20:45Z","isPatch":true,"sender":{"key":"yoshfuji@linux-ipv6.org","avatar":"https://gravatar.com/avatar/92c288bb8d3e34afd7bb1574cc1079a3d0aa6d36d80955d1ec6a1cea2868d392?d=mp&s=160"},"body":"In article <7vr7866uww.fsf@assigned-by-dhcp.cox.net> (at Wed, 21 Dec 2005 12:45:51 -0800), Junio C Hamano <junkio@cox.net> says:\n\n> That is, how does one do something like this, with an ipv6\n> literal address?\n> \n> \ttelnet 127.0.0.1 80\n> \n> Is it done like this\n> \n> \ttelnet '[::1]' 80\n> \n> or\n> \ttelnet '::1' 80\n> \n> Your patch suggests the former, but I just wanted to make sure.\n\nIn this case (telnet), we do the latter.\nBut, we definitely do\n        scp file1 file2 ... '[3ffe:ffff:...:1]:/tmp/'\nlike\n        scp file1 file2 ... remote.example.com:/tmp/\n\nHope this helps.\n\n--yoshfuji\n"},{"id":"13899","messageId":"7vaceu2gty.fsf@assigned-by-dhcp.cox.net","threadId":"2893","inReplyTo":"7v1x065blx.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] GIT: Support [address] in URLs","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-21T23:03:37Z","receivedAt":"2005-12-21T23:03:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> writes:\n\n> But, we definitely do\n>         scp file1 file2 ... '[3ffe:ffff:...:1]:/tmp/'\n> like\n>         scp file1 file2 ... remote.example.com:/tmp/\n\nThanks.\n"},{"id":"13900","messageId":"20051222.080828.28117009.yoshfuji@linux-ipv6.org","threadId":"2893","inReplyTo":"7v3bkm3vw4.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] GIT: Support [address] in URLs","fromName":"YOSHIFUJI Hideaki / 吉藤英明","fromEmail":"yoshfuji@linux-ipv6.org","sentAt":"2005-12-21T23:08:28Z","receivedAt":"2005-12-21T23:08:28Z","isPatch":true,"sender":{"key":"yoshfuji@linux-ipv6.org","avatar":"https://gravatar.com/avatar/92c288bb8d3e34afd7bb1574cc1079a3d0aa6d36d80955d1ec6a1cea2868d392?d=mp&s=160"},"body":"In article <7v3bkm3vw4.fsf@assigned-by-dhcp.cox.net> (at Wed, 21 Dec 2005 14:52:59 -0800), Junio C Hamano <junkio@cox.net> says:\n\n> This is the second reply to Yoshifuji-san today that did not\n> come back to me from the list (but I did get it back from my ISP\n> due to BCCing myself), so I am resending.\n\nI got all of them; with and without my Japanese name on To:.\n\n--yoshfuji\n"},{"id":"13902","messageId":"7v8xue11ag.fsf_-_@assigned-by-dhcp.cox.net","threadId":"2893","inReplyTo":"20051222.080828.28117009.yoshfuji@linux-ipv6.org","subject":"[OT] western cultural imperialism at vger?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-21T23:24:39Z","receivedAt":"2005-12-21T23:24:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> writes:\n\n> In article <7v3bkm3vw4.fsf@assigned-by-dhcp.cox.net> (at Wed, 21 Dec 2005 14:52:59 -0800), Junio C Hamano <junkio@cox.net> says:\n>\n>> This is the second reply to Yoshifuji-san today that did not\n>> come back to me from the list (but I did get it back from my ISP\n>> due to BCCing myself), so I am resending.\n>\n> I got all of them; with and without my Japanese name on To:.\n\nYour \"oops this is the corrected patch\" message appeared in my\nmailbox only once, which suggests vger discarded it.  It does\nnot appear on marc nor gmane archive either.\n\nIt seems to me that vger drops messages whose content-type is\n\"text/plain; charset=iso-2022-jp\"; this western cultural\nimperialism is inexcusable -- the list accepts iso-8859-1 just\nfine, so it is not like it is us-ascii only.  It just does not\nlike iso-2022-jp.\n\nNah, I am just joking about the \"imperialism\" part, but I think\nthat is what is happening.\n\nMost of your messages, although you have your Japanese name on\nthe From: header line, are charset=us-ascii, and indeed the body\nof them are us-ascii only, and is flowing on the list just fine.\nThe \"oops this is the corrected patch\" message from you was done\nas a reply to your own message, which started with something\nlike this (Japanese omitted for obvious reasons):\n\n    In article <20051221.192342.132228413.yoshfuji@linux-ipv6.org> (at Wed, 21 Dec 2005 19:23:42 +0900 (JST)), YOSHIFUJI Hideaki / [J][J][J][J] <yoshfuji@linux-ipv6.org> says:\n\n    > Hello.\n    > \n    > Allow address enclosed by [] in URLs, like:\n    >    git push '[3ffe:ffff:...:1]:GIT/git'\n    > or\n    >    git push 'ssh://[3ffe:ffff:...:1]/GIT/git'\n    > \n    > Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>\n\n    oops, this is not correct. Please use this instead.\n\nWhich made your MUA to send it in iso-2022-jp, and I suspect\nthat is why I saw it only once, direct delivery.\n"},{"id":"13903","messageId":"20051221.152648.122640664.davem@davemloft.net","threadId":"2893","inReplyTo":"20051222.080828.28117009.yoshfuji@linux-ipv6.org","subject":"Re: [PATCH] GIT: Support [address] in URLs","fromName":"David S. Miller","fromEmail":"davem@davemloft.net","sentAt":"2005-12-21T23:26:48Z","receivedAt":"2005-12-21T23:26:48Z","isPatch":true,"sender":{"key":"davem@davemloft.net","avatar":null},"body":"From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>\nDate: Thu, 22 Dec 2005 08:08:28 +0900 (JST)\n\n> In article <7v3bkm3vw4.fsf@assigned-by-dhcp.cox.net> (at Wed, 21 Dec 2005 14:52:59 -0800), Junio C Hamano <junkio@cox.net> says:\n> \n> > This is the second reply to Yoshifuji-san today that did not\n> > come back to me from the list (but I did get it back from my ISP\n> > due to BCCing myself), so I am resending.\n> \n> I got all of them; with and without my Japanese name on To:.\n\nThe vger.kernel.org spam filter filters out all non-ascii character\nsets.  We have to do this because Matti and myself do all of the\nfiltering by hand, and we do not understand so many languages as to be\nable to make sensible filters for spam in languages such as Japanese,\nKorean, Chinese, Russian, etc. so we just filter them all.\n\nI've asked people, such as Yoshifuji-san, on a number of occaisions if\nthey would mind not including Japanese characters (even if it is their\nname in their FROM: field) in postings to the lists.\n\nAs long as they continue to do so, replies to their postings will be\nfilterd when their From: field ends up in the body of the posting.  I\nedit the Japanese characters out by hand when I make replies to such\npostings, and that is why my responses show up.\n\nThis is a pain, but no better solutions have been suggested.  Before\nanyone responds: 1) making the lists subscriber-only is not an option\n2) Bayesian filters are hard to integrate into our setup but we are\nexploring ways to make that a reality at some point nevertheless.\n"},{"id":"13904","messageId":"20051221.152954.72230976.davem@davemloft.net","threadId":"2893","inReplyTo":"7v8xue11ag.fsf_-_@assigned-by-dhcp.cox.net","subject":"Re: [OT] western cultural imperialism at vger?","fromName":"David S. Miller","fromEmail":"davem@davemloft.net","sentAt":"2005-12-21T23:29:54Z","receivedAt":"2005-12-21T23:29:54Z","isPatch":false,"sender":{"key":"davem@davemloft.net","avatar":null},"body":"From: Junio C Hamano <junkio@cox.net>\nDate: Wed, 21 Dec 2005 15:24:39 -0800\n\n> It seems to me that vger drops messages whose content-type is\n> \"text/plain; charset=iso-2022-jp\"; this western cultural\n> imperialism is inexcusable -- the list accepts iso-8859-1 just\n> fine, so it is not like it is us-ascii only.  It just does not\n> like iso-2022-jp.\n\nNo, we filter for certain multibyte characters.\n\nIf you can teach Matti Aarnio and myself how to speak Japanese,\nKorean, Russian, and Chinese, and thus be able to build proper\nregexp's for SPAM in those languages, we'll happily do it.\n"},{"id":"13906","messageId":"m3oe3ayqa4.fsf@defiant.localdomain","threadId":"2893","inReplyTo":"7v8xue11ag.fsf_-_@assigned-by-dhcp.cox.net","subject":"Re: [OT] western cultural imperialism at vger?","fromName":"Krzysztof Halasa","fromEmail":"khc@pm.waw.pl","sentAt":"2005-12-21T23:38:27Z","receivedAt":"2005-12-21T23:38:27Z","isPatch":false,"sender":{"key":"khc@pm.waw.pl","avatar":null},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> It seems to me that vger drops messages whose content-type is\n> \"text/plain; charset=iso-2022-jp\";\n\nI think (a part of) the above line is in spam filter on vger. They\nuse a simple substring match, details are on http://vger.kernel.org.\n\nThey could probably be able to reject inbound SMTP transfer and not\nsilently drop the message later.\n-- \nKrzysztof Halasa\n"},{"id":"13907","messageId":"20051221.154631.49133242.davem@davemloft.net","threadId":"2893","inReplyTo":"m3oe3ayqa4.fsf@defiant.localdomain","subject":"Re: [OT] western cultural imperialism at vger?","fromName":"David S. Miller","fromEmail":"davem@davemloft.net","sentAt":"2005-12-21T23:46:31Z","receivedAt":"2005-12-21T23:46:31Z","isPatch":false,"sender":{"key":"davem@davemloft.net","avatar":null},"body":"From: Krzysztof Halasa <khc@pm.waw.pl>\nDate: Thu, 22 Dec 2005 00:38:27 +0100\n\n> I think (a part of) the above line is in spam filter on vger. They\n> use a simple substring match, details are on http://vger.kernel.org.\n\nRight, http://vger.kernel.org/majordomo-taboos.txt\n\nThere are content type regexps in there as well as checks\nfor specific multi-byte character sequences.\n"},{"id":"13911","messageId":"20051222.085917.60400643.yoshfuji@linux-ipv6.org","threadId":"2893","inReplyTo":"20051221.152648.122640664.davem@davemloft.net","subject":"Re: [PATCH] GIT: Support [address] in URLs","fromName":"YOSHIFUJI Hideaki / 吉藤英明","fromEmail":"yoshfuji@linux-ipv6.org","sentAt":"2005-12-21T23:59:17Z","receivedAt":"2005-12-21T23:59:17Z","isPatch":true,"sender":{"key":"yoshfuji@linux-ipv6.org","avatar":"https://gravatar.com/avatar/92c288bb8d3e34afd7bb1574cc1079a3d0aa6d36d80955d1ec6a1cea2868d392?d=mp&s=160"},"body":"In article <20051221.152648.122640664.davem@davemloft.net> (at Wed, 21 Dec 2005 15:26:48 -0800 (PST)), \"David S. Miller\" <davem@davemloft.net> says:\n\n> The vger.kernel.org spam filter filters out all non-ascii character\n> sets.  We have to do this because Matti and myself do all of the\n> filtering by hand, and we do not understand so many languages as to be\n> able to make sensible filters for spam in languages such as Japanese,\n> Korean, Chinese, Russian, etc. so we just filter them all.\n\nToo bad...\n\nWell, I know some Japanese people kill all messages with non-Japanese\n(usually English) subject... It is too bad, too...\n\n\n> This is a pain, but no better solutions have been suggested.  Before\n> anyone responds: 1) making the lists subscriber-only is not an option\n> 2) Bayesian filters are hard to integrate into our setup but we are\n> exploring ways to make that a reality at some point nevertheless.\n\nCan I help you somehow?\nE.g. if you give me an account on vger, I happily try to find the way to\nsetup bayesian filter(s) on them.\n\nRegards,\n\n--yoshfuji\n"},{"id":"13912","messageId":"20051221.160811.129593851.davem@davemloft.net","threadId":"2893","inReplyTo":"20051222.085917.60400643.yoshfuji@linux-ipv6.org","subject":"Re: [PATCH] GIT: Support [address] in URLs","fromName":"David S. Miller","fromEmail":"davem@davemloft.net","sentAt":"2005-12-22T00:08:11Z","receivedAt":"2005-12-22T00:08:11Z","isPatch":true,"sender":{"key":"davem@davemloft.net","avatar":null},"body":"From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>\nDate: Thu, 22 Dec 2005 08:59:17 +0900 (JST)\n\n> Can I help you somehow?\n> E.g. if you give me an account on vger, I happily try to find the way to\n> setup bayesian filter(s) on them.\n\nYou are expert with Zmailer+Majordomo? :-)\n\nSure, it is no problem to setup Bayesian filter with sendmail, qmail,\nExim et al. with standard mailing list software.  But doing it with\nthe Zmailer and Majordomo setup we have is non-trivial.\n\nMatti, non-ascii filtering really becomes big enough pain enough to\nfix.  I can do the leg work if you can provide some pointers and\nwhat you know so far.\n\nThanks.\n"},{"id":"13943","messageId":"Pine.LNX.4.64.0512221129060.25300@iabervon.org","threadId":"2893","inReplyTo":"20051221.152648.122640664.davem@davemloft.net","subject":"Re: [PATCH] GIT: Support [address] in URLs","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-12-22T16:48:46Z","receivedAt":"2005-12-22T16:48:46Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Wed, 21 Dec 2005, David S. Miller wrote:\n\n> This is a pain, but no better solutions have been suggested.  Before\n> anyone responds: 1) making the lists subscriber-only is not an option\n> 2) Bayesian filters are hard to integrate into our setup but we are\n> exploring ways to make that a reality at some point nevertheless.\n\nWould it work to strip out all of the characters which are only in the \ndisallowed character set, change the character set to ascii, and check the \nmessage like that? (Of course, empty or substantially reduced messages \nshould be discarded instead) It looks like the non-spam in these character \nsets only has a few non-ascii characters, and those are transliterated \ninto ascii nearby anyway, and I doubt that there's much spam in non-ascii \nwith only a few characters in some other character set that wouldn't be \nobvious in some other way after those characters were removed.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"}]}