]> git.ipfire.org Git - thirdparty/git.git/commit
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)
commit7fa7dc8904882a40107af71a751bad5d1572ba4c
tree45331936e57f959446e630d91c6689d8d6aff834
parent5d97861b9baf3b0596f2a1c343634062aec2df84
delete_refs(): bail early if the packed-refs file cannot be rewritten

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>
refs.c