sparse-checkout: init and set in cone mode
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 21 Nov 2019 22:04:42 +0000 (22:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Nov 2019 07:11:44 +0000 (16:11 +0900)
commitaf09ce24a9c79f6efc12d1d8f1052e1d1dbe5016
tree891fd159fc031e75616a0afea9ec33f7e39b3202
parent96cc8ab5318cd57c8bc203b8f064b35883b2386f
sparse-checkout: init and set in cone mode

To make the cone pattern set easy to use, update the behavior of
'git sparse-checkout (init|set)'.

Add '--cone' flag to 'git sparse-checkout init' to set the config
option 'core.sparseCheckoutCone=true'.

When running 'git sparse-checkout set' in cone mode, a user only
needs to supply a list of recursive folder matches. Git will
automatically add the necessary parent matches for the leading
directories.

When testing 'git sparse-checkout set' in cone mode, check the
error stream to ensure we do not see any errors. Specifically,
we want to avoid the warning that the patterns do not match
the cone-mode patterns.

Helped-by: Eric Wong <e@80x24.org>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/sparse-checkout.c
dir.c
dir.h
t/t1091-sparse-checkout-builtin.sh