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

Re: [PATCH] git-svn: allow "0" in SVN path components

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 12, 2016, 19:04 UTC
Message-ID
<xmqqinqpm0it.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161212110914.GA24736@starla>
Eric Wong <e@80x24.org> writes:
Show 27 quoted lines
> Blindly checking a path component for falsiness is unwise, as
> "0" is false to Perl, but a valid pathname component for SVN
> (or any filesystem).
>
> Found via random code reading.
>
> Signed-off-by: Eric Wong <e@80x24.org>
> ---
>   Junio: this bugfix should go to "maint".
>   Will push along with a doc fix for Juergen.
>
>  perl/Git/SVN/Ra.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
> index e764696801..56ad9870bc 100644
> --- a/perl/Git/SVN/Ra.pm
> +++ b/perl/Git/SVN/Ra.pm
> @@ -606,7 +606,7 @@ sub minimize_url {
>  			my $latest = $ra->get_latest_revnum;
>  			$ra->get_log("", $latest, 0, 1, 0, 1, sub {});
>  		};
> -	} while ($@ && ($c = shift @components));
> +	} while ($@ && defined($c = shift @components));
>  
>  	return canonicalize_url($url);
>  }
Makes sense to me.  Thanks.
Previous: Eric Wong
Message 2 of 2 in “git-svn: allow "0" in SVN path components”
  1. git-svn: allow "0" in SVN path componentsEric Wong, Dec 12, 2016
  2. Junio C HamanoDec 12, 2016

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.