Subject: Re: [PATCH v2 08/10] sparse-index: complete partial expansion

From: Derrick Stolee <[email-masked]>
Date: Mon, 23 May 2022 09:18:43 -0400

On 5/23/2022 9:13 AM, Derrick Stolee wrote:
> On 5/21/2022 3:45 AM, Junio C Hamano wrote:
>> "Derrick Stolee via GitGitGadget" <[email-masked]> writes:

>> By the way, why are we passing the "--missing-ok" option to "git
>> write-tree" here?
>>
>>> +	cache_tree_update(istate, WRITE_TREE_MISSING_OK);
>>
>> The same question here.  We didn't say "missing trees are OK".  What
>> made it OK in this change?
>  
> Both of these additions of WRITE_TREE_MISSING_OK are not needed. I
> think I added them in an earlier version, thinking they were needed
> due to something in the Scalar functional tests. I confirmed just now
> that they are not needed for that. I will remove them.

As I went to remove these from sparse-index.c, I found another that
exists, but for good reason. See 8a96b9d0a (sparse-index: use
WRITE_TREE_MISSING_OK, 2021-09-08), which explains that that instance
needs the flag because it could be used during 'git add'.

It still isn't necessary in the instances being added here, so I will
remove them.

Thanks,
-Stolee