summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Eric Wong <normalperson@yhbt.net>2007-01-11 17:58:39 -0800
committerLibravatar Eric Wong <normalperson@yhbt.net>2007-02-23 00:57:09 -0800
commit5969cbe13c7e65db6441632d58e7dee40795a980 (patch)
tree8ff5201afa4ff215d5316b25bd12db73c39b9534
parentgit-svn: add a test for show-ignore (diff)
downloadtgif-5969cbe13c7e65db6441632d58e7dee40795a980.tar.xz
git-svn: convert show-ignore over to Git::SVN
Signed-off-by: Eric Wong <normalperson@yhbt.net>
-rwxr-xr-xgit-svn.perl12
1 files changed, 5 insertions, 7 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 02786f1a6a..e0bccbcdc9 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -121,7 +121,7 @@ my %cmd = (
%cmt_opts, %fc_opts } ],
'set-tree' => [ \&commit, "Set an SVN repository to a git tree-ish",
{ 'stdin|' => \$_stdin, %cmt_opts, %fc_opts, } ],
- 'show-ignore' => [ \&show_ignore, "Show svn:ignore listings",
+ 'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore listings",
{ 'revision|r=i' => \$_revision } ],
rebuild => [ \&rebuild, "Rebuild git-svn metadata (after git clone)",
{ 'copy-remote|remote=s' => \$_cp_remote,
@@ -537,12 +537,10 @@ sub dcommit {
command_noisy(@finish, $gs);
}
-sub show_ignore {
- $SVN_URL ||= file_to_s("$GIT_SVN_DIR/info/url");
- my $repo;
- $SVN ||= Git::SVN::Ra->new($SVN_URL);
- my $r = defined $_revision ? $_revision : $SVN->get_latest_revnum;
- libsvn_traverse_ignore(\*STDOUT, '', $r);
+sub cmd_show_ignore {
+ my $gs = Git::SVN->new;
+ my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum);
+ $gs->traverse_ignore(\*STDOUT, '', $r);
}
sub graft_branches {