Skip to content

Commit 2303cad

Browse files
snaewegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d0f1ea6 commit 2303cad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Documentation/git-ls-remote.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ OPTIONS
4242
it successfully talked with the remote repository, whether it
4343
found any matching refs.
4444

45+
--get-url::
46+
Expand the URL of the given remote repository taking into account any
47+
"url.<base>.insteadOf" config setting (See linkgit:git-config[1]) and
48+
exit without talking to the remote.
49+
4550
<repository>::
4651
Location of the repository. The shorthand defined in
4752
$GIT_DIR/branches/ can be used. Use "." (dot) to list references in

builtin/ls-remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
static const char ls_remote_usage[] =
77
"git ls-remote [--heads] [--tags] [-u <exec> | --upload-pack <exec>]\n"
8-
" [-q|--quiet] [--exit-code] [<repository> [<refs>...]]";
8+
" [-q|--quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]";
99

1010
/*
1111
* Is there one among the list of patterns that match the tail part

0 commit comments

Comments
 (0)