sparse-checkout: extract pattern update from 'set' subcommand
authorDerrick Stolee <dstolee@microsoft.com>
Tue, 11 Feb 2020 15:02:22 +0000 (15:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Feb 2020 16:47:13 +0000 (08:47 -0800)
commit4bf0c06c7169da61de489544207a7659ef31029f
tree294f4a269f74813fe5102f8ee394f94c8d2267b6
parent6fb705abcb6044f07954b486d71c05151262b6b6
sparse-checkout: extract pattern update from 'set' subcommand

In anticipation of adding "add" and "remove" subcommands to the
sparse-checkout builtin, extract a modify_pattern_list() method from the
sparse_checkout_set() method. This command will read input from the
command-line or stdin to construct a set of patterns, then modify the
existing sparse-checkout patterns after a successful update of the
working directory.

Currently, the only way to modify the patterns is to replace all of the
patterns. This will be extended in a later update.

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