Re: [PATCH v2 08/10] sparse-index: complete partial expansion
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- May 23, 2022, 13:18 UTC
- Message-ID
- <f9abea8d-5386-5275-4de2-27d443945c7a@github.com>
- In-Reply-To
- <5909f466-c323-0874-b175-51fe5e93dc12@github.com>
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" <gitgitgadget@gmail.com> writes:
Show 12 quoted lines
>> 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