summaryrefslogtreecommitdiff
path: root/git-remote.perl
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2007-07-05 22:06:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-06 05:12:59 (GMT)
commit09ff69bb39b386e24a39723d9e20263a915bc6d6 (patch)
tree7b3897d45b7971e7a818368ecbb0a9e8d0656c7e /git-remote.perl
parent6cb93bf478e7dd6253c9a644aff8758ce9aacf49 (diff)
downloadgit-09ff69bb39b386e24a39723d9e20263a915bc6d6.zip
git-09ff69bb39b386e24a39723d9e20263a915bc6d6.tar.gz
git-09ff69bb39b386e24a39723d9e20263a915bc6d6.tar.bz2
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>
Diffstat (limited to 'git-remote.perl')
-rwxr-xr-xgit-remote.perl14
1 files changed, 13 insertions, 1 deletions
diff --git a/git-remote.perl b/git-remote.perl
index b59cafd..01cf480 100755
--- 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') {