git-svn: allow "0" in SVN path components
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>
Eric Wong committed
Nov 30, 2016 at 00:45 UTC
a0f5a0c8285395d6eb2123e0c1ce78f900e1567c
1 file changed
+1
-1
perl/Git/SVN/Ra.pm
+1
-1
@@ -606,7 +606,7 @@ sub minimize_url {
606
my $latest = $ra->get_latest_revnum;
607
$ra->get_log("", $latest, 0, 1, 0, 1, sub {});
608
};
609
- } while ($@ && ($c = shift @components));
609
+ } while ($@ && defined($c = shift @components));
610
611
return canonicalize_url($url);
612
}