git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: "Jeff King" <peff@peff.net>, "Väinö Järvelä" <v@pp.inet.fi>,
	git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"Lars Hjemli" <hjemli@gmail.com>
Subject: [PATCH] Fix a crash in ls-remote when refspec expands into nothing
Date: Fri, 12 Oct 2007 22:40:04 +0200	[thread overview]
Message-ID: <20071012204004.GA6700@steel.home> (raw)
In-Reply-To: <20071012040745.GC27899@spearce.org>

Originally-by: Väinö Järvelä <v@pp.inet.fi>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 remote.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Shawn O. Pearce, Fri, Oct 12, 2007 06:07:45 +0200:
> I think the above patch is the only thing to do here.  Perhaps Alex
> can write up a formal patch and send it to back to the list and CC
> Lars Hjemli <hjemli@gmail.com> so he can put it into the patch queue.

here you go

diff --git a/remote.c b/remote.c
index e7d735b..a25f66d 100644
--- a/remote.c
+++ b/remote.c
@@ -882,7 +882,8 @@ int get_fetch_map(struct ref *remote_refs,
 			    rm->peer_ref->name);
 	}
 
-	tail_link_ref(ref_map, tail);
+	if (ref_map)
+		tail_link_ref(ref_map, tail);
 
 	return 0;
 }
-- 
1.5.3.4.232.ga843

  reply	other threads:[~2007-10-12 20:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09  8:51 [PATCH] Added a test for fetching remote tags when there is not tags Väinö Järvelä
2007-10-09  8:51 ` [PATCH] Fixed crash in " Väinö Järvelä
2007-10-09 10:52   ` Väinö Järvelä
2007-10-09 18:20     ` Alex Riesen
2007-10-10  5:10       ` Jeff King
2007-10-10 21:27         ` Alex Riesen
2007-10-10 21:33           ` Jeff King
2007-10-12  4:07           ` Shawn O. Pearce
2007-10-12 20:40             ` Alex Riesen [this message]
2007-10-14 21:26               ` [PATCH] Fix a crash in ls-remote when refspec expands into nothing Lars Hjemli

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=20071012204004.GA6700@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hjemli@gmail.com \
    --cc=peff@peff.net \
    --cc=spearce@spearce.org \
    --cc=v@pp.inet.fi \
    /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).