Fix a crash in ls-remote when refspec expands into nothing

Originally-by: Väinö Järvelä <v@pp.inet.fi>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Alex Riesen 2007-10-12 22:40:04 +02:00 committed by Shawn O. Pearce
parent 2467a4fa03
commit 8f70a7657a

View File

@ -909,7 +909,8 @@ int get_fetch_map(struct ref *remote_refs,
rm->peer_ref->name); rm->peer_ref->name);
} }
tail_link_ref(ref_map, tail); if (ref_map)
tail_link_ref(ref_map, tail);
return 0; return 0;
} }