Re: [PATCH 05/16] replace-object: eliminate replace objects prepared flag
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 10, 2018, 03:21 UTC
- Message-ID
- <xmqqzi2b3fww.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180409224533.17764-6-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
> By making the oidmap a pointer, we eliminate the need for > the global boolean variable 'replace_object_prepared'.
That is not quite a justification for this change, as making it a pointer (and paying for the malloc(3) overhead) is not the only way to remove the variable (i.e. the "has this been initialized?" bit can be moved to "struct raw_object_store").
One possible advantage of this approach, I guess, is that we would more quickly catch code that tries to access replace-map without initializing it.