Skip to content

Commit 102a0a2

Browse files
Eric WongJunio C Hamano
authored andcommitted
git-svn: fix show-ignore when not connected to the repository root
It was traversing the entire repository before. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent ae792aa commit 102a0a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-svn.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ sub cmd_show_ignore {
447447
my $url = (::working_head_info('HEAD'))[0];
448448
my $gs = Git::SVN->find_by_url($url) || Git::SVN->new;
449449
my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum);
450-
$gs->traverse_ignore(\*STDOUT, '', $r);
450+
$gs->traverse_ignore(\*STDOUT, $gs->{path}, $r);
451451
}
452452

453453
sub cmd_multi_init {
@@ -1334,7 +1334,7 @@ sub traverse_ignore {
13341334
my $ra = $self->ra;
13351335
my ($dirent, undef, $props) = $ra->get_dir($path, $r);
13361336
my $p = $path;
1337-
$p =~ s#^\Q$ra->{svn_path}\E/##;
1337+
$p =~ s#^\Q$self->{path}\E(/|$)##;
13381338
print $fh length $p ? "\n# $p\n" : "\n# /\n";
13391339
if (my $s = $props->{'svn:ignore'}) {
13401340
$s =~ s/[\r\n]+/\n/g;

0 commit comments

Comments
 (0)