Skip to content

Commit

Permalink
git-svn: avoid fetching files outside of the URL we're tracking
Browse files Browse the repository at this point in the history
Thanks to Santi <sbejar@gmail.com> for the bug report and explanation:
> /path/to/repository/project/file
> /path/to/repository/project-2/file
<...>
> you end up with a project with the following files:
>
> file
> -2/file

Signed-off-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Jul 5, 2006
1 parent 2718ff0 commit 4bbf599
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/git-svn/git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -2617,7 +2617,7 @@ sub libsvn_connect {
sub libsvn_get_file {
my ($gui, $f, $rev) = @_;
my $p = $f;
return unless ($p =~ s#^\Q$SVN_PATH\E/?##);
return unless ($p =~ s#^\Q$SVN_PATH\E/##);

my ($hash, $pid, $in, $out);
my $pool = SVN::Pool->new;
Expand Down

0 comments on commit 4bbf599

Please sign in to comment.