From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Daniel Barkalow <barkalow@iabervon.org>
Subject: [PATCH] Fix 'git remote show' regression on empty repository in 1.5.4
Date: Tue, 4 Mar 2008 01:00:36 -0500 [thread overview]
Message-ID: <20080304060036.GA17106@spearce.org> (raw)
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>
---
This patch is built against `maint`.
It will cause a merge conflict against `master` as there is a
change there to invoke transport_disconnect(transport) before
displaying the refs.
Since the disconnect patch is not in maint, but this is a current
regression in 1.5.4.3, I'm sending you a conflicting patch. :)
As far as resolving this when it merges to master, the return value
of transport_disconnect() is probably what should be checked to
signal a non-zero exit status to the caller, not the empty ref list.
builtin-ls-remote.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c
index 6dd31d1..720280e 100644
--- a/builtin-ls-remote.c
+++ b/builtin-ls-remote.c
@@ -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;
next reply other threads:[~2008-03-04 6:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 6:00 Shawn O. Pearce [this message]
2008-03-04 8:37 ` [PATCH] Fix 'git remote show' regression on empty repository in 1.5.4 Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080304060036.GA17106@spearce.org \
--to=spearce@spearce.org \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).