]> git.ipfire.org Git - thirdparty/git.git/commit
sparse-checkout: remove use of the_repository
authorDerrick Stolee <stolee@gmail.com>
Fri, 12 Sep 2025 10:30:05 +0000 (10:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Sep 2025 15:59:51 +0000 (08:59 -0700)
commit064468e89919e9cf16d2afa59de33a242a4d71ab
tree22498754af89fea83398f094539c4ca197249d1c
parentc44beea485f0f2feaf460e2ac87fdd5608d63cf0
sparse-checkout: remove use of the_repository

The logic for the 'git sparse-checkout' builtin uses the_repository all
over the place, despite some use of a repository struct in different
method parameters. Complete this removal of the_repository by using
'repo' when possible.

In one place, there was already a local variable 'r' that was set to
the_repository, so move that to a method parameter.

We cannot remove the USE_THE_REPOSITORY_VARIABLE declaration as we are
still using global constants for the state of the sparse-checkout.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/sparse-checkout.c