Re: What's cooking in git.git (Sep 2021, #08; Mon, 27)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 1, 2021, 22:02 UTC
- Message-ID
- <xmqqr1d42ykj.fsf@gitster.g>
- In-Reply-To
- <CABPp-BEhLQ3b8OCn3EbTa=g7uh_YXmkQuuGazn=OsT=bG3ot1w@mail.gmail.com>
Elijah Newren <newren@gmail.com> 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.