From 8b014d7157d29ce76b0f631e19c6e2ce9aeb2366 Mon Sep 17 00:00:00 2001 From: "David D. Kilzer" Date: Wed, 21 Nov 2007 11:57:19 -0800 Subject: git-svn: info --url [path] Return the svn URL for the given path, or return the svn repository URL if no path is given. Added 18 tests to t/t9119-git-svn-info.sh. Signed-off-by: David D. Kilzer Acked-by: Eric Wong --- git-svn.perl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'git-svn.perl') diff --git a/git-svn.perl b/git-svn.perl index fd10361045..7d86870ee4 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -65,7 +65,7 @@ BEGIN $_template, $_shared, $_version, $_fetch_all, $_no_rebase, $_merge, $_strategy, $_dry_run, $_local, - $_prefix, $_no_checkout, $_verbose); + $_prefix, $_no_checkout, $_url, $_verbose); $Git::SVN::_follow_parent = 1; my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username, 'config-dir=s' => \$Git::SVN::Ra::config_dir, @@ -181,7 +181,7 @@ BEGIN 'info' => [ \&cmd_info, "Show info about the latest SVN revision on the current branch", - { } ], + { 'url' => \$_url, } ], ); my $cmd; @@ -773,6 +773,11 @@ sub cmd_info { } my $full_url = $url . ($path eq "." ? "" : "/$path"); + if ($_url) { + print $full_url, "\n"; + return; + } + my $result = "Path: $path\n"; $result .= "Name: " . basename($path) . "\n" if $file_type ne "dir"; $result .= "URL: " . $full_url . "\n"; -- cgit 1.2.3-korg