]> git.ipfire.org Git - thirdparty/git.git/commit
worktree: extract copy_sparse_checkout()
authorDerrick Stolee <derrickstolee@github.com>
Wed, 23 Feb 2022 14:29:11 +0000 (14:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Feb 2022 20:24:41 +0000 (12:24 -0800)
commitace5ac533a198e9bb7f634dafa8e7b10a42919c4
treebc64206ea1b312d4805be120bb3090d4d145d2f2
parent863970536525f071b29f2ee73ac9ac0a35b32a43
worktree: extract copy_sparse_checkout()

This logic was introduced by 5325591 (worktree: copy sparse-checkout
patterns and config on add, 2022-02-07), but some feedback came in that
the add_worktree() method was already too complex. It is better to
extract this logic into a helper method to reduce this complexity.

Reported-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/worktree.c