From: Eric Wong Date: Sun, 4 Mar 2007 08:15:29 +0000 (-0800) Subject: git-svn: fix show-ignore when not connected to the repository root X-Git-Tag: v1.5.1-rc1~99 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=102a0a2db14cd7604a8a2b6590ecbd6bf3136394;p=git.git git-svn: fix show-ignore when not connected to the repository root It was traversing the entire repository before. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- diff --git a/git-svn.perl b/git-svn.perl index 41961b59f..326e89fe0 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -447,7 +447,7 @@ sub cmd_show_ignore { my $url = (::working_head_info('HEAD'))[0]; my $gs = Git::SVN->find_by_url($url) || Git::SVN->new; my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum); - $gs->traverse_ignore(\*STDOUT, '', $r); + $gs->traverse_ignore(\*STDOUT, $gs->{path}, $r); } sub cmd_multi_init { @@ -1334,7 +1334,7 @@ sub traverse_ignore { my $ra = $self->ra; my ($dirent, undef, $props) = $ra->get_dir($path, $r); my $p = $path; - $p =~ s#^\Q$ra->{svn_path}\E/##; + $p =~ s#^\Q$self->{path}\E(/|$)##; print $fh length $p ? "\n# $p\n" : "\n# /\n"; if (my $s = $props->{'svn:ignore'}) { $s =~ s/[\r\n]+/\n/g;