]> git.ipfire.org Git - thirdparty/git.git/commit
sparse-checkout: break apart functions for sparse_checkout_(set|add)
authorElijah Newren <newren@gmail.com>
Tue, 14 Dec 2021 04:09:04 +0000 (04:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Dec 2021 19:48:21 +0000 (11:48 -0800)
commit0b624e039cc2c9e30333445e8c67002f41d63678
treea9adfddda2f805fe203183982e56af14d2dc5a8c
parent1530ff3553c197ae04b5d9363e2c2b1f7d4198e1
sparse-checkout: break apart functions for sparse_checkout_(set|add)

sparse_checkout_set() was reused by sparse_checkout_add() with the only
difference being a single parameter being passed to that function.
However, we would like sparse_checkout_set() to do the same work that
sparse_checkout_init() does if sparse checkouts are not already enabled.
To facilitate this transition, give each mode their own copy of the
function.  This does not introduce any behavioral changes; that will
come in a subsequent patch.

Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Victoria Dye <vdye@github.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/sparse-checkout.c