From: Alex Riesen <raa.lkml@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <junkio@cox.net>
Subject: [PATCH] Add -v|--verbose to git remote to show remote url
Date: Fri, 6 Jul 2007 00:06:56 +0200 [thread overview]
Message-ID: <20070705220656.GE8751@steel.home> (raw)
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>
---
Fixed and tested. Being used.
git-remote.perl | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/git-remote.perl b/git-remote.perl
index b59cafd..e13d7b9 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') {
--
1.5.3.rc0.56.g6b87
next reply other threads:[~2007-07-05 22:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-05 22:06 Alex Riesen [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-05 21:57 [PATCH] Add -v|--verbose to git remote to show remote url Alex Riesen
2007-07-05 22:02 ` Alex Riesen
2007-07-05 22:10 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070705220656.GE8751@steel.home \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).