Skip to content

Commit

Permalink
Fix a crash in ls-remote when refspec expands into nothing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Riesen authored and Shawn O. Pearce committed Oct 16, 2007
1 parent 2467a4f commit 8f70a76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 8f70a76

Please sign in to comment.