git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Naewe <stefan.naewe@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Stefan Naewe <stefan.naewe@gmail.com>
Subject: [PATCH] ls-remote: document the '--get-url' option
Date: Fri,  7 Sep 2012 08:41:19 +0200	[thread overview]
Message-ID: <1347000079-7945-1-git-send-email-stefan.naewe@gmail.com> (raw)
In-Reply-To: <7v7gs63mio.fsf@alter.siamese.dyndns.org>

While looking for a way to expand the URL of a remote
that uses a 'url.<name>.insteadOf' config option I stumbled
over the undocumented '--get-url' option of 'git ls-remote'.
This adds some minimum documentation for that option.

And while at it, also add that option to the '-h' output.

Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
---
 Documentation/git-ls-remote.txt | 4 ++++
 builtin/ls-remote.c             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 7a9b86a..a2ebf1d 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -42,6 +42,10 @@ OPTIONS
 	it successfully talked with the remote repository, whether it
 	found any matching refs.
 
+--get-url::
+	Expand the URL of the given remote repository taking into account any
+	"url.<base>.insteadOf" config setting (See linkgit:git-config[1]).
+
 <repository>::
 	Location of the repository.  The shorthand defined in
 	$GIT_DIR/branches/ can be used. Use "." (dot) to list references in
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 41c88a9..25e83cf 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -5,7 +5,7 @@
 
 static const char ls_remote_usage[] =
 "git ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]\n"
-"                     [-q|--quiet] [--exit-code] [<repository> [<refs>...]]";
+"                     [-q|--quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]";
 
 /*
  * Is there one among the list of patterns that match the tail part
-- 
1.7.12

  reply	other threads:[~2012-09-07  6:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 17:27 [PATCH] ls-remote: document the '--get-url' option Stefan Naewe
2012-09-06 20:49 ` Junio C Hamano
2012-09-07  6:41   ` Stefan Naewe [this message]
2012-09-07  8:28     ` Andreas Schwab
2012-09-07  9:12       ` Stefan Naewe
2012-09-07 17:57     ` 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=1347000079-7945-1-git-send-email-stefan.naewe@gmail.com \
    --to=stefan.naewe@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).