{"thread":{"id":"44682","subject":"[PATCH] git-svn: allow \"0\" in SVN path components","startedAt":"2016-12-12T11:09:31Z","lastAt":"2016-12-12T19:05:09Z","messageCount":2,"participants":["Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"307501","messageId":"20161212110914.GA24736@starla","threadId":"44682","inReplyTo":null,"subject":"[PATCH] git-svn: allow \"0\" in SVN path components","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2016-12-12T11:09:14Z","receivedAt":"2016-12-12T11:09:31Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Blindly checking a path component for falsiness is unwise, as\n\"0\" is false to Perl, but a valid pathname component for SVN\n(or any filesystem).\n\nFound via random code reading.\n\nSigned-off-by: Eric Wong <e@80x24.org>\n---\n  Junio: this bugfix should go to \"maint\".\n  Will push along with a doc fix for Juergen.\n\n perl/Git/SVN/Ra.pm | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm\nindex e764696801..56ad9870bc 100644\n--- a/perl/Git/SVN/Ra.pm\n+++ b/perl/Git/SVN/Ra.pm\n@@ -606,7 +606,7 @@ sub minimize_url {\n \t\t\tmy $latest = $ra->get_latest_revnum;\n \t\t\t$ra->get_log(\"\", $latest, 0, 1, 0, 1, sub {});\n \t\t};\n-\t} while ($@ && ($c = shift @components));\n+\t} while ($@ && defined($c = shift @components));\n \n \treturn canonicalize_url($url);\n }\n-- \nEW\n"},{"id":"307529","messageId":"xmqqinqpm0it.fsf@gitster.mtv.corp.google.com","threadId":"44682","inReplyTo":"20161212110914.GA24736@starla","subject":"Re: [PATCH] git-svn: allow \"0\" in SVN path components","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-12-12T19:04:58Z","receivedAt":"2016-12-12T19:05:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <e@80x24.org> writes:\n\n> Blindly checking a path component for falsiness is unwise, as\n> \"0\" is false to Perl, but a valid pathname component for SVN\n> (or any filesystem).\n>\n> Found via random code reading.\n>\n> Signed-off-by: Eric Wong <e@80x24.org>\n> ---\n>   Junio: this bugfix should go to \"maint\".\n>   Will push along with a doc fix for Juergen.\n>\n>  perl/Git/SVN/Ra.pm | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm\n> index e764696801..56ad9870bc 100644\n> --- a/perl/Git/SVN/Ra.pm\n> +++ b/perl/Git/SVN/Ra.pm\n> @@ -606,7 +606,7 @@ sub minimize_url {\n>  \t\t\tmy $latest = $ra->get_latest_revnum;\n>  \t\t\t$ra->get_log(\"\", $latest, 0, 1, 0, 1, sub {});\n>  \t\t};\n> -\t} while ($@ && ($c = shift @components));\n> +\t} while ($@ && defined($c = shift @components));\n>  \n>  \treturn canonicalize_url($url);\n>  }\n\nMakes sense to me.  Thanks.\n"}]}