Skip to content

Commit

Permalink
Fix 'git remote show' regression on empty repository in 1.5.4
Browse files Browse the repository at this point in the history
Back in 18f7c51 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>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Mar 4, 2008
1 parent 81646ad commit 52dce39
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions builtin-ls-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
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;
Expand Down

0 comments on commit 52dce39

Please sign in to comment.