From: Alex Riesen Date: Fri, 12 Oct 2007 20:40:04 +0000 (+0200) Subject: Fix a crash in ls-remote when refspec expands into nothing X-Git-Tag: v1.5.4-rc0~292^2~23 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8f70a7657a9b459d6a4a3bcb1628c0fa6a6c22e0;p=git.git Fix a crash in ls-remote when refspec expands into nothing Originally-by: Väinö Järvelä Signed-off-by: Alex Riesen Signed-off-by: Lars Hjemli Signed-off-by: Shawn O. Pearce --- diff --git a/remote.c b/remote.c index e2ca4d32b..b20e2be43 100644 --- a/remote.c +++ b/remote.c @@ -909,7 +909,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; }