]> git.ipfire.org Git - thirdparty/git.git/commit
sparse-index: refactor path_found()
authorDerrick Stolee <stolee@gmail.com>
Fri, 28 Jun 2024 12:43:22 +0000 (12:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Jun 2024 19:32:11 +0000 (12:32 -0700)
commitb746a85d9a0d2384d3219b3b53593ccb880f3124
tree91afbc9bc98b4e5fddae9820563dbb6052377a65
parent532e21698634b4aa305981a6243bc8e3bd795ae1
sparse-index: refactor path_found()

In advance of changing the behavior of path_found(), take all of the
intermediate data values and group them into a single struct. This
simplifies the method prototype as well as the initialization. Future
changes can be made directly to the struct and method without changing
the callers with this approach.

Note that the clear_path_found_data() method is currently empty, as
there is nothing to free. This method is a placeholder for future
changes that require a non-trivial implementation. Its stub is created
now so consumers could call it now and not change in future changes.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sparse-index.c