# [PATCH] Add -v|--verbose to git remote to show remote url

3 messages from 2007-07-05 to 2007-07-05. Participants: Alex Riesen, Junio C Hamano.
Thread: https://gitlist.dev/t/8883

## Alex Riesen, 2007-07-05 21:57

Subject: [PATCH] Add -v|--verbose to git remote to show remote url
Message-ID: <20070705215730.GC8751@steel.home>
URL: https://gitlist.dev/e/20070705215730.GC8751%40steel.home

```
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>
---

The $VERBOSE may be even used by some of the subcommands
later.

 git-remote.perl |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/git-remote.perl b/git-remote.perl
index b59cafd..449d97b 100755
--- a/git-remote.perl
+++ b/git-remote.perl
@@ -319,9 +319,14 @@ sub add_usage {
 	exit(1);
 }
 
+local $VERBOSE = 0;
+@ARGV = grep { $VERBOSE=1,0 if $_ eq '-v' or $_ eq '--verbose' } @ARGV;
+
 if (!@ARGV) {
 	for (sort keys %$remote) {
-		print "$_\n";
+		print "$_";
+		print "\t$remote->{$_}->{URL}" if $VERBOSE;
+		print "\n";
 	}
 }
 elsif ($ARGV[0] eq 'show') {
-- 
1.5.3.rc0.56.g6b87

```

## Alex Riesen, 2007-07-05 22:02

Subject: Re: [PATCH] Add -v|--verbose to git remote to show remote url
Message-ID: <20070705220247.GD8751@steel.home>
URL: https://gitlist.dev/e/20070705220247.GD8751%40steel.home
In-Reply-To: <20070705215730.GC8751@steel.home>

```
Alex Riesen, Thu, Jul 05, 2007 23:57:30 +0200:
> +local $VERBOSE = 0;
> +@ARGV = grep { $VERBOSE=1,0 if $_ eq '-v' or $_ eq '--verbose' } @ARGV;
> +

Do NOT apply: this filters out _all_ of command line.

```

## Junio C Hamano, 2007-07-05 22:10

Subject: Re: [PATCH] Add -v|--verbose to git remote to show remote url
Message-ID: <7vps36ijt0.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vps36ijt0.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20070705220247.GD8751@steel.home>

```
Alex Riesen <raa.lkml@gmail.com> writes:

> Alex Riesen, Thu, Jul 05, 2007 23:57:30 +0200:
>> +local $VERBOSE = 0;
>> +@ARGV = grep { $VERBOSE=1,0 if $_ eq '-v' or $_ eq '--verbose' } @ARGV;
>> +
>
> Do NOT apply: this filters out _all_ of command line.

Heh, I was wondering what you were smoking ;-).

```
