@matheusbsbs / matheus-bagliano / commits / 5969cbe13c
Fork 0

git-svn: convert show-ignore over to Git::SVN

Signed-off-by: Eric Wong <normalperson@yhbt.net>

Eric Wong committed Jan 11, 2007 at 17:58 UTC 5969cbe13c7e65db6441632d58e7dee40795a980
1 file changed +5 -7
git-svn.perl
+5 -7
@@ -121,7 +121,7 @@ my %cmd = (
121 %cmt_opts, %fc_opts } ],
122 'set-tree' => [ \&commit, "Set an SVN repository to a git tree-ish",
123 { 'stdin|' => \$_stdin, %cmt_opts, %fc_opts, } ],
124 - 'show-ignore' => [ \&show_ignore, "Show svn:ignore listings",
124 + 'show-ignore' => [ \&cmd_show_ignore, "Show svn:ignore listings",
125 { 'revision|r=i' => \$_revision } ],
126 rebuild => [ \&rebuild, "Rebuild git-svn metadata (after git clone)",
127 { 'copy-remote|remote=s' => \$_cp_remote,
@@ -537,12 +537,10 @@ sub dcommit {
537 command_noisy(@finish, $gs);
538 }
539
540 -sub show_ignore {
541 - $SVN_URL ||= file_to_s("$GIT_SVN_DIR/info/url");
542 - my $repo;
543 - $SVN ||= Git::SVN::Ra->new($SVN_URL);
544 - my $r = defined $_revision ? $_revision : $SVN->get_latest_revnum;
545 - libsvn_traverse_ignore(\*STDOUT, '', $r);
540 +sub cmd_show_ignore {
541 + my $gs = Git::SVN->new;
542 + my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum);
543 + $gs->traverse_ignore(\*STDOUT, '', $r);
544 }
545
546 sub graft_branches {