Skip to content

Commit 52dce39

Browse files
spearcegitster
authored andcommitted
Fix 'git remote show' regression on empty repository in 1.5.4
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 81646ad commit 52dce39

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

builtin-ls-remote.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
9494
transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack);
9595

9696
ref = transport_get_remote_refs(transport);
97-
98-
if (!ref)
99-
return 1;
100-
10197
for ( ; ref; ref = ref->next) {
10298
if (!check_ref_type(ref, flags))
10399
continue;

0 commit comments

Comments
 (0)