Subject: Re: [PATCH 00/11] Clarify API for dir.[ch] and unpack-trees.[ch] -- mark relevant fields as internal

From: Derrick Stolee <[email-masked]>
Date: Thu, 23 Feb 2023 10:26:15 -0500

On 2/23/2023 10:18 AM, Derrick Stolee wrote:
> On 2/23/2023 4:14 AM, Elijah Newren via GitGitGadget wrote:
>> This patch is primarily about moving internal-only fields within these two
>> structs into an embedded internal struct. Patch breakdown:
>>
>>  * Patches 1-3: Restructuring dir_struct
>>    * Patch 1: Splitting off internal-use-only fields
>>    * Patch 2: Add important usage note to avoid accidentally using
>>      deprecated API
>>    * Patch 3: Mark output-only fields as such
>>  * Patches 4-11: Restructuring unpack_trees_options
>>    * Patches 4-6: Preparatory cleanup
>>    * Patches 7-10: Splitting off internal-use-only fields
>>    * Patch 11: Mark output-only field as such
...
> The best news is that your existing series makes it easier to flip
> to the internal pointer method in the future, since we can shift
> the 'd->internal.member" uses into "d->internal->member" in a
> mechanical way. Thus, the change you are proposing does not lock us
> into this approach if we change our minds later.

And now that I've read the series in its entirety, I think it is
well organized and does not need any updates. It creates a better
situation than what we already have, and any changes to split the
internal structs to be anonymous to callers can be done as a
follow-up.

Thanks,
-Stolee