author | Tay Ray Chuan <rctay89@gmail.com> | |
Tue, 11 May 2010 17:20:23 +0000 (01:20 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 May 2010 05:55:44 +0000 (22:55 -0700) | ||
commit | cefb2a5e39b165146aee3b093872721cc1155a87 | |
tree | 363db940a175c13b4524bacc2867ed6b6587cac9 | tree | snapshot |
parent | 9c00de5a3135c8f7273668d4013c225d48d47861 | commit | diff |
ls-remote: print URL when no repo is specified
After 9c00de5 (ls-remote: fall-back to default remotes when no remote
specified), when no repository is specified, ls-remote may use
the URL/remote in the config "branch.<name>.remote" or the remote
"origin"; it may not be immediately obvious to the user which was used.
In such cases, print a simple "From <URL>" line to indicate which
repository was used. This message is similar to git-fetch's, and is
printed to stderr to avoid breaking existing scripts that depend on
ls-remote's output behaviour.
It can also be disabled with -q/--quiet.
Modify tests related to falling back on default remotes to check for
this as well, and add a test to check for suppression of the message.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
After 9c00de5 (ls-remote: fall-back to default remotes when no remote
specified), when no repository is specified, ls-remote may use
the URL/remote in the config "branch.<name>.remote" or the remote
"origin"; it may not be immediately obvious to the user which was used.
In such cases, print a simple "From <URL>" line to indicate which
repository was used. This message is similar to git-fetch's, and is
printed to stderr to avoid breaking existing scripts that depend on
ls-remote's output behaviour.
It can also be disabled with -q/--quiet.
Modify tests related to falling back on default remotes to check for
this as well, and add a test to check for suppression of the message.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/ls-remote.c | diff | blob | history | |
t/t5512-ls-remote.sh | diff | blob | history |