git-svn: info --url [path]
[gitweb.git] / git-svn.perl
index fd1036104550c6d500a9ee64498c06558fcca9ff..7d86870ee4705090a5b46f3fbf5d0e48e2b3888e 100755 (executable)
@@ -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";