Re: [PATCH v2 09/11] sparse-checkout: use hashmaps for cone patterns
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Sep 19, 2019, 20:59 UTC
- Message-ID
- <6b461ad3-164d-46ff-4a68-99f8e6562a72@gmail.com>
- In-Reply-To
- <95a3285bc6021daa236d98d7e1bbdc5c45fc73b0.1568904188.git.gitgitgadget@gmail.com>
On 9/19/2019 10:43 AM, Derrick Stolee via GitGitGadget wrote:
Show 8 quoted lines
> @@ -848,6 +953,10 @@ static int add_patterns_from_buffer(char *buf, size_t size, > int i, lineno = 1; > char *entry; > > + pl->use_cone_patterns = core_sparse_checkout_cone; > + hashmap_init(&pl->recursive_hashmap, pl_hashmap_cmp, NULL, 0); > + hashmap_init(&pl->parent_hashmap, pl_hashmap_cmp, NULL, 0); > +
Just a head's-up to anyone looking at this series: this is not the right place to set use_cone_patterns (without passing a flag or something). This same path is called from the .gitignore machinery, so if you have a non-cone pattern in your .gitignore you will start seeing warnings with core.sparseCheckoutCone=true.
I figured it out only via integration tests with our C# layer. In v2 I'll fix this and add a test to make sure it stays fixed.
Otherwise, everything is working as expected.
-Stolee