Jeff King 752848df0f remote: handle broken symrefs
It's possible for resolve_ref_unsafe() to return NULL with a
REF_ISSYMREF flag if a symref points to a broken ref.  In
this case, the read_remote_branches() function will segfault
passing the name to xstrdup().

This is hard to trigger in practice, since this function is
used as a callback to for_each_ref(), which will skip broken
refs in the first place (so it would have to be broken
racily, or for us to see a transient filesystem error).

If we see such a racy broken outcome let's treat it as "not
a symref". This is exactly the same thing that would happen
in the non-racy case (our function would not be called at
all, as for_each_ref would skip the broken symref).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-10-21 21:29:02 +09:00
..
2017-09-10 17:02:51 +09:00
2016-11-22 13:55:20 -08:00
2017-09-06 13:11:25 +09:00
2017-09-28 14:47:53 +09:00
2017-06-24 14:28:41 -07:00
2017-10-07 16:27:55 +09:00
2017-10-03 15:42:49 +09:00
2017-10-07 16:27:55 +09:00
2017-10-07 16:27:55 +09:00
2017-09-29 11:23:43 +09:00
2017-03-31 08:33:56 -07:00
2017-08-26 22:55:09 -07:00
2017-09-29 11:23:43 +09:00
2017-09-25 15:24:09 +09:00
2017-10-18 10:19:08 +09:00
2017-09-25 15:24:07 +09:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-09-19 10:47:57 +09:00
2017-08-03 13:11:02 -07:00
2017-10-07 16:27:55 +09:00
2017-08-26 22:55:09 -07:00
2017-08-22 10:29:03 -07:00
2017-10-21 21:29:02 +09:00
2017-06-24 14:28:41 -07:00
2017-09-19 10:47:55 +09:00
2017-08-03 13:11:02 -07:00
2017-08-22 10:29:03 -07:00
2017-01-23 18:51:56 -08:00
2017-10-18 10:19:08 +09:00
2017-09-19 10:47:55 +09:00
2017-06-24 14:28:41 -07:00