ls-remote: document the '--get-url' option

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Naewe 2012-09-07 08:41:19 +02:00 committed by Junio C Hamano
parent d0f1ea6003
commit 2303cad242
2 changed files with 6 additions and 1 deletions

View file

@ -42,6 +42,11 @@ OPTIONS
it successfully talked with the remote repository, whether it it successfully talked with the remote repository, whether it
found any matching refs. 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]) and
exit without talking to the remote.
<repository>:: <repository>::
Location of the repository. The shorthand defined in Location of the repository. The shorthand defined in
$GIT_DIR/branches/ can be used. Use "." (dot) to list references in $GIT_DIR/branches/ can be used. Use "." (dot) to list references in

View file

@ -5,7 +5,7 @@
static const char ls_remote_usage[] = static const char ls_remote_usage[] =
"git ls-remote [--heads] [--tags] [-u <exec> | --upload-pack <exec>]\n" "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 * Is there one among the list of patterns that match the tail part