delete_refs(): bail early if the packed-refs file cannot be rewritten
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 22 Jun 2015 14:02:57 +0000 (16:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jun 2015 20:17:10 +0000 (13:17 -0700)
If we fail to delete the doomed references from the packed-refs file,
then it is unsafe to delete their loose references, because doing so
might expose a value from the packed-refs file that is obsolete and
perhaps even points at an object that has been garbage collected.

So if repack_without_refs() fails, emit a more explicit error message
and bail.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found