summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81646ad)
raw | patch | inline | side by side (parent: 81646ad)
author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 4 Mar 2008 06:00:36 +0000 (01:00 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 4 Mar 2008 06:47:14 +0000 (22:47 -0800) |
Back in 18f7c51c we switched git-ls-remote/git-peek-remote to
use the transport backend, rather than do everything itself.
As part of that switch we started to produce a non-zero exit
status if no refs were received from the remote peer, which
happens when the remote peer has no commits pushed to it yet.
(E.g. "git --git-dir=foo.git init; git ls-remote foo.git")
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
use the transport backend, rather than do everything itself.
As part of that switch we started to produce a non-zero exit
status if no refs were received from the remote peer, which
happens when the remote peer has no commits pushed to it yet.
(E.g. "git --git-dir=foo.git init; git ls-remote foo.git")
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-ls-remote.c | patch | blob | history |
diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c
index 6dd31d1dd6c14677f91e8a0a941fb0f873b4c1fc..720280e3900dc65a5063306a55880b8bc1330c2a 100644 (file)
--- a/builtin-ls-remote.c
+++ b/builtin-ls-remote.c
transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack);
ref = transport_get_remote_refs(transport);
-
- if (!ref)
- return 1;
-
for ( ; ref; ref = ref->next) {
if (!check_ref_type(ref, flags))
continue;