Re: [PATCH v5 10/17] sparse-checkout: init and set in cone mode
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Nov 21, 2019, 13:45 UTC
- Message-ID
- <c6f641bd-8e26-b8c4-6456-65d480952ab2@gmail.com>
- In-Reply-To
- <20191119175046.GK23183@szeder.dev>
On 11/19/2019 12:50 PM, SZEDER Gábor wrote:
Show 17 quoted lines
> On Mon, Oct 21, 2019 at 01:56:19PM +0000, Derrick Stolee via GitGitGadget wrote: >> From: Derrick Stolee <dstolee@microsoft.com> >> >> 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'. > > It's not necessary to run 'git sparse-checkout init' before running > 'git sparse-checkout set'. The description of the latter in the > documentation is not explicit about it, but the commit message adding > the 'set' subcommand is, and there are several test cases that run > 'set' without a preceeding 'init. > > Therefore, I think the 'set' subcommand should get a '--cone' option > as well.
I will take this under advisement, and revisit it in the follow-up. The recommended usage is to run 'init --cone' first, or to set 'core.sparseCheckoutCone=true' before running the 'set' command. We can improve this pattern to be more robust in the future.