@matheusbsbs / matheus-bagliano / commits / 52dce39762
Fork 0

Fix 'git remote show' regression on empty repository in 1.5.4

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>

Shawn O. Pearce committed Mar 4, 2008 at 01:00 UTC 52dce39762fbec75b2d561e5dedb25b8e51f83eb
1 file changed -4
builtin-ls-remote.c
-4
@@ -94,10 +94,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
94 transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack);
95
96 ref = transport_get_remote_refs(transport);
97 -
98 - if (!ref)
99 - return 1;
100 -
97 for ( ; ref; ref = ref->next) {
98 if (!check_ref_type(ref, flags))
99 continue;