Re: [PATCH 1/2] remote: defer repacking packed-refs when deleting refs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 27, 2014, 16:55 UTC
- Message-ID
- <xmqqha4bgo0p.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAEef6Wxg2QkWDzjuogh5sjjE=HZ9NRUmiY9AhExSXK7H3pAcNA@mail.gmail.com>
Jens Lindström <jl@opera.com> writes:
Show 6 quoted lines
>> Puzzled.... > > There is one reason why one would want to call delete_ref() even if > the ref itself was already fully deleted by repack_without_refs() > (because it was only packed) and that is that delete_ref() also > removes the ref log, if there is one.
Ahh, ok, no longer puzzled---I completely forgot about that part.
Show 8 quoted lines
> We could refactor the deletion to > > 1) repack_without_refs() on all refs > 2) delete_ref() on still existing (loose) refs > 3) delete_ref_log() on all refs > > to let us only call delete_ref() on existing refs, and then keep the > current value check.
I tend to agree that it is sufficient for the purpose of this topic to be loose about the check; the refactoring can come later, as part of the ref-transaction refactoring that is going on in a separate thread.