]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-remote.perl
Add -v|--verbose to git remote to show remote url
[thirdparty/git.git] / git-remote.perl
index b59cafdf87f7a800f85b6b99fc0344c7102e892a..01cf480221be1e5860bd701d5d17ced25766d38d 100755 (executable)
@@ -319,9 +319,21 @@ sub add_usage {
        exit(1);
 }
 
+local $VERBOSE = 0;
+@ARGV = grep {
+       if ($_ eq '-v' or $_ eq '--verbose') {
+               $VERBOSE=1;
+               0
+       } else {
+               1
+       }
+} @ARGV;
+
 if (!@ARGV) {
        for (sort keys %$remote) {
-               print "$_\n";
+               print "$_";
+               print "\t$remote->{$_}->{URL}" if $VERBOSE;
+               print "\n";
        }
 }
 elsif ($ARGV[0] eq 'show') {