Re: [PATCH v3 10/12] sparse-checkout: write escaped patterns in cone mode
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jan 29, 2020, 14:39 UTC
- Message-ID
- <50a17375-d2ab-239c-8a23-2c8fdd306903@gmail.com>
- In-Reply-To
- <7a85cded-eccf-9f33-4056-08b2923b2861@gmail.com>
On 1/29/2020 9:16 AM, Derrick Stolee wrote:
Show 14 quoted lines
> On 1/29/2020 5:33 AM, Jeff King wrote: >> On Wed, Jan 29, 2020 at 05:17:13AM -0500, Jeff King wrote: >>>> +static char *escaped_pattern(char *pattern) >>> [...] >>> Do we need to catch other metacharacters here (using is_glob_special() >>> perhaps)? >> >> After de-confusing myself, I think the individual code comments I wrote >> still apply though (especially this one). > > I've applied the smaller comments and am now investigating the right > thing to do with other is_glob_special() characters. There is a small > chance that I can replace any "c == '*' || c == '\'" with is_glob_special(), > but we shall see. At the very least, I'll need to expand my tests.
I think I have a handle on these cases, and I've pushed it to my GGG PR. I'll let this version settle a bit for more review before updating it with a v4.
Thanks, -Stolee