Subject: ps/avoid-unnecessary-hook-invocation-with-packed-refs (was: What's cooking in git.git (Feb 2022, #01; Thu, 3))

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Fri, 04 Feb 2022 13:31:53 +0100

On Thu, Feb 03 2022, Junio C Hamano wrote:

> * ps/avoid-unnecessary-hook-invocation-with-packed-refs (2022-01-17) 6 commits
>  - refs: skip hooks when deleting uncovered packed refs
>  - refs: do not execute reference-transaction hook on packing refs
>  - refs: demonstrate excessive execution of the reference-transaction hook
>  - refs: allow skipping the reference-transaction hook
>  - refs: allow passing flags when beginning transactions
>  - refs: extract packed_refs_delete_refs() to allow control of transaction
>
>  Because a deletion of ref would need to remove it from both the
>  loose ref store and the packed ref store, a delete-ref operation
>  that logically removes one ref may end up invoking ref-transaction
>  hook twice, which has been corrected.
>
>  Will merge to 'next'?
>  source: <[email-masked]>

I think so, I didn't reply but I consider the feedback I had on it fully
addressed. In particular the "is this the right direction?" comment
replied to at https://lore.kernel.org/git/YeUhMPSlC%2FX6HRBF@ncase/

I'm not digging it up now, but I think Han-Wen correctly noted that we
have a "packed" backend for no particular good reason, and much of that
is die/stub functions, we should really just have a unified "the file
stuff" backend.

So from an API perspective messaging upwards about loose->packed or
whatever is as irrelevant as having a psql backend and messaging about
VACUUM, which is essentially paraphrasing what Patrick correctly points
out there.