Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Add -v|--verbose to git remote to show remote url
author
Alex Riesen
<raa.lkml@gmail.com>
Thu, 5 Jul 2007 22:06:56 +0000
(
00:06
+0200)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 6 Jul 2007 05:12:59 +0000
(22:12 -0700)
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>
git-remote.perl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
6cb93bf
)
diff --git
a/git-remote.perl
b/git-remote.perl
index b59cafdf87f7a800f85b6b99fc0344c7102e892a..01cf480221be1e5860bd701d5d17ced25766d38d 100755
(executable)
--- a/
git-remote.perl
+++ b/
git-remote.perl
@@
-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') {