From: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> Signed-off-by: Stefan Beller <sbel...@google.com> --- refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c index 780acd5..2db1dff 100644 --- a/refs.c +++ b/refs.c @@ -2707,8 +2707,10 @@ int repack_without_refs(struct string_list *without, struct strbuf *err) /* Remove any other accumulated cruft */ do_for_each_entry_in_dir(packed, 0, curate_packed_ref_fn, &refs_to_delete); for_each_string_list_item(ref_to_delete, &refs_to_delete) { - if (remove_entry(packed, ref_to_delete->string) == -1) + if (remove_entry(packed, ref_to_delete->string) == -1) { + rollback_packed_refs(); die("internal error"); + } } /* Write what remains */ -- 2.2.0.rc2.5.gf7b9fb2 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html