Add -v|--verbose to git remote to show remote url
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>
This commit is contained in:

committed by
Junio C Hamano

parent
6cb93bf478
commit
09ff69bb39
@ -319,9 +319,21 @@ sub add_usage {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local $VERBOSE = 0;
|
||||||
|
@ARGV = grep {
|
||||||
|
if ($_ eq '-v' or $_ eq '--verbose') {
|
||||||
|
$VERBOSE=1;
|
||||||
|
0
|
||||||
|
} else {
|
||||||
|
1
|
||||||
|
}
|
||||||
|
} @ARGV;
|
||||||
|
|
||||||
if (!@ARGV) {
|
if (!@ARGV) {
|
||||||
for (sort keys %$remote) {
|
for (sort keys %$remote) {
|
||||||
print "$_\n";
|
print "$_";
|
||||||
|
print "\t$remote->{$_}->{URL}" if $VERBOSE;
|
||||||
|
print "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ($ARGV[0] eq 'show') {
|
elsif ($ARGV[0] eq 'show') {
|
||||||
|
Reference in New Issue
Block a user