Skip to content

Commit

Permalink
Add -v|--verbose to git remote to show remote url
Browse files Browse the repository at this point in the history
Many other commands already have such an option, and I find it
practical to see where all the remotes actually come from.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Alex Riesen authored and Junio C Hamano committed Jul 6, 2007
1 parent 6cb93bf commit 09ff69b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion git-remote.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 09ff69b

Please sign in to comment.