git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-svn: fix show-ignore when not connected to the repository root

From
EWEric Wong <normalperson@yhbt.net>
Date
Mar 4, 2007, 08:15 UTC
Message-ID
<1172996129553-git-send-email-normalperson@yhbt.net>
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
Message 1 of 1 in “git-svn: fix show-ignore when not connected to the repository root”
  1. git-svn: fix show-ignore when not connected to the repository rootEric Wong, Mar 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.