Re: [PATCH 3/5] sparse-index API: fix TODO, BUG() out on NULL ensure_full_index()
- From
Philip Oakley <philipoakley@iee.email>
- Date
- Jan 10, 2023, 10:35 UTC
- Message-ID
- <f2e69f51-ae92-4383-d86d-4d5d29c684a6@iee.email>
- In-Reply-To
- <patch-3.5-d96388acef6-20230110T060340Z-avarab@gmail.com>
On 10/01/2023 06:17, Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
> Make the ensure_full_index() function stricter, and have it only > accept a non-NULL "struct index_state". This function (and this > behavior) was added in [1]. > > The only reason it needed to be this lax was due to interaction with > repo_index_has_changes(). See the addition of that code in .
Missing reference. Should this be [2]?
Show 18 quoted lines
> This > fixes one of the TODO comments added in 0c18c059a15, the other one was > already removed in [3]. > > The other reason for why this was needed dates back to interaction > with code added in [4]. In [5] we started calling ensure_full_index() > in unpack_trees(), but the caller added in 34110cd4e39 wants to pass > us a NULL "dst_index". Let's instead do the NULL check in > unpack_trees() itself. > > 1. 4300f8442a2 (sparse-index: implement ensure_full_index(), 2021-03-30) > 2. 0c18c059a15 (read-cache: ensure full index, 2021-04-01) > 3. d76723ee531 (status: use sparse-index throughout, 2021-07-14). > 4. 34110cd4e39 (Make 'unpack_trees()' have a separate source and > destination index, 2008-03-06) > 5. 6863df35503 (unpack-trees: ensure full index, 2021-03-30) > > Signed-off-by: Ævar Arnfjörð Bjarmason<avarab@gmail.com>
-- Philip