Subject: Re: What's cooking in git.git (Sep 2021, #08; Mon, 27)

From: Junio C Hamano <[email-masked]>
Date: Fri, 01 Oct 2021 15:02:36 -0700

Elijah Newren <[email-masked]> writes:

> So with that out of the way, let's return to discussing the textconv
> cache.  If the remerge-diff results aren't cached, isn't it unsafe to
> allow the textconv cache to persist anything while remerge-diff is
> running because it could create corruption?

I do not think anybody involved in this thread thinks it is
practical to annotate each write_object_file() with "this is
temporary" vs "this is to persist", so it is a given that it would
be all-or-none.  If we want write_object_file() called while we are
running remerge-diff to write to a temporary object store, we have
to accept any other write_object_file() called by somebody else,
like textconv cache, must become temporary.

It may be sufficient to plug ref updates (which would cover the
finialization of notes-cache used by the textconv cache) to avoid
corruption, but that might give us a pointless and unpleasant error
message, so it may be necessary to teach the notes-cache stuff to
allow getting existing cached data while disabling it to accept
cache updates.

Thanks.