get_local_heads(): do not return random pointer if there is no head
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 16 Apr 2009 22:16:23 +0000 (08:16 +1000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 18 Apr 2009 03:48:32 +0000 (20:48 -0700)
it's silly to do this:

mkdir foo && cd foo && git init && git push somewhere.git

but segfault should not happen even in that case.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found