From: Jeff King Date: Tue, 14 Jan 2020 21:21:20 GMT Subject: Re: [PATCH 7/8] sparse-checkout: properly match escaped characters Message-ID: <20200114212120.GC3949560@coredump.intra.peff.net> In-Reply-To: <09dbe1f9029d173e579b74442b02bc20e1a82437.1579029963.git.gitgitgadget@gmail.com> On Tue, Jan 14, 2020 at 07:26:01PM +0000, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee > > In cone mode, the sparse-checkout feature uses hashset containment > queries to match paths. Make this algorithm respect escaped asterisk > (*) and backslash (\) characters. > > Create dup_and_filter_pattern() method to convert a pattern by > removing escape characters and dropping an optional "/*" at the end. > This method is available in dir.h as we will use it in > builtin/sparse-chekcout.c in a later change. s/chekcout/checkout/ It took me a minute to understand the problem here, but I think it's: if a path in the sparse-checkout file has "\*" in it, we'd try to match a literal "\*" in the hash, not "*"? But we wouldn't run into that yet because we don't properly _write_ the escaped names until patch 8. Is that right? -Peff