* [PATCH] git-svn: fix show-ignore when not connected to the repository root
@ 2007-03-04 8:15 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2007-03-04 8:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Eric Wong
It was traversing the entire repository before.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-svn.perl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 41961b5..326e89f 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;
--
1.5.0.1.212.g2e5e24
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-04 8:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-04 8:15 [PATCH] git-svn: fix show-ignore when not connected to the repository root Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).