public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Eric Wong <e@80x24•org>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] git-svn: allow "0" in SVN path components
Date: Mon, 12 Dec 2016 11:04:58 -0800	[thread overview]
Message-ID: <xmqqinqpm0it.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20161212110914.GA24736@starla> (Eric Wong's message of "Mon, 12 Dec 2016 11:09:14 +0000")

Eric Wong <e@80x24•org> writes:

> 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.

      reply	other threads:[~2016-12-12 19:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 11:09 [PATCH] git-svn: allow "0" in SVN path components Eric Wong
2016-12-12 19:04 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqinqpm0it.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=e@80x24$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox