* [PATCH] ls-remote: document the '--get-url' option
@ 2012-09-06 17:27 Stefan Naewe
2012-09-06 20:49 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Naewe @ 2012-09-06 17:27 UTC (permalink / raw)
To: git; +Cc: gitster, Stefan Naewe
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.
Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
---
Documentation/git-ls-remote.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 7a9b86a..5819ead 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
--
1.7.12
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ls-remote: document the '--get-url' option
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
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2012-09-06 20:49 UTC (permalink / raw)
To: Stefan Naewe; +Cc: git, Uwe Kleine-König
Stefan Naewe <stefan.naewe@gmail.com> writes:
> 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.
>
> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
> ---
> Documentation/git-ls-remote.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
> index 7a9b86a..5819ead 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
OK. Do we want to also add this to the "git ls-remote -h" output,
or is it used so infrequently that it is not worth cluttering the
help text there?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ls-remote: document the '--get-url' option
2012-09-06 20:49 ` Junio C Hamano
@ 2012-09-07 6:41 ` Stefan Naewe
2012-09-07 8:28 ` Andreas Schwab
2012-09-07 17:57 ` Junio C Hamano
0 siblings, 2 replies; 6+ messages in thread
From: Stefan Naewe @ 2012-09-07 6:41 UTC (permalink / raw)
To: git; +Cc: gitster, Stefan Naewe
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ls-remote: document the '--get-url' option
2012-09-07 6:41 ` Stefan Naewe
@ 2012-09-07 8:28 ` Andreas Schwab
2012-09-07 9:12 ` Stefan Naewe
2012-09-07 17:57 ` Junio C Hamano
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2012-09-07 8:28 UTC (permalink / raw)
To: Stefan Naewe; +Cc: git, gitster
Stefan Naewe <stefan.naewe@gmail.com> writes:
> +--get-url::
> + Expand the URL of the given remote repository taking into account any
> + "url.<base>.insteadOf" config setting (See linkgit:git-config[1]).
This should probably also mention that it suppresses the normal output.
(I wonder why this isn't a subcommand of git remote.)
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ls-remote: document the '--get-url' option
2012-09-07 8:28 ` Andreas Schwab
@ 2012-09-07 9:12 ` Stefan Naewe
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Naewe @ 2012-09-07 9:12 UTC (permalink / raw)
To: Andreas Schwab; +Cc: git, gitster
On Fri, Sep 7, 2012 at 10:28 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Stefan Naewe <stefan.naewe@gmail.com> writes:
>
>> +--get-url::
>> + Expand the URL of the given remote repository taking into account any
>> + "url.<base>.insteadOf" config setting (See linkgit:git-config[1]).
>
> This should probably also mention that it suppresses the normal output.
Like this: http://cloud.github.com/downloads/snaewe/git/git-ls-remote.html
(I also added a simple example. I'll create a new patch if it's OK)
> (I wonder why this isn't a subcommand of git remote.)
Good question...
Stefan
--
----------------------------------------------------------------
python -c "print '73746566616e2e6e6165776540676d61696c2e636f6d'.decode('hex')"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ls-remote: document the '--get-url' option
2012-09-07 6:41 ` Stefan Naewe
2012-09-07 8:28 ` Andreas Schwab
@ 2012-09-07 17:57 ` Junio C Hamano
1 sibling, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2012-09-07 17:57 UTC (permalink / raw)
To: Stefan Naewe; +Cc: git
Stefan Naewe <stefan.naewe@gmail.com> writes:
> 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]).
> +
I'll queue this, after adding "... and exit without talking to the remote."
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-07 17:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-09-07 8:28 ` Andreas Schwab
2012-09-07 9:12 ` Stefan Naewe
2012-09-07 17:57 ` Junio C Hamano
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).