From: Stefan Naewe Date: Fri, 7 Sep 2012 06:41:19 +0000 (+0200) Subject: ls-remote: document the '--get-url' option X-Git-Tag: v1.7.12.2~13^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2303cad242a6ccc4745d7994ecc0425bd8513a0d;p=git.git ls-remote: document the '--get-url' option While looking for a way to expand the URL of a remote that uses a 'url..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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index 7a9b86a58..774de5e9d 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -42,6 +42,11 @@ 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..insteadOf" config setting (See linkgit:git-config[1]) and + exit without talking to the remote. + :: 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 41c88a98a..25e83cfe9 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 | --upload-pack ]\n" -" [-q|--quiet] [--exit-code] [ [...]]"; +" [-q|--quiet] [--exit-code] [--get-url] [ [...]]"; /* * Is there one among the list of patterns that match the tail part