Re: [PATCH 2/2] pathspec: allow escaped query values
- From
- Brandon Williams <bmwill@google.com>
- Date
- Mar 10, 2017, 18:53 UTC
- Message-ID
- <20170310185332.GC53198@google.com>
- In-Reply-To
- <a81ad8b5-3b49-8232-1656-66b2e9d78569@google.com>
On 03/09, Jonathan Tan wrote:
Show 21 quoted lines
> On 03/09/2017 01:07 PM, Brandon Williams wrote: > >diff --git a/t/t6135-pathspec-with-attrs.sh b/t/t6135-pathspec-with-attrs.sh > >index b5e5a0607..585d17bad 100755 > >--- a/t/t6135-pathspec-with-attrs.sh > >+++ b/t/t6135-pathspec-with-attrs.sh > >@@ -178,4 +178,13 @@ test_expect_success 'abort on asking for wrong magic' ' > > test_must_fail git ls-files . ":(attr:!label=foo)" > > ' > > > >+test_expect_success 'check attribute list' ' > >+ cat <<-EOF >>.gitattributes && > >+ * whitespace=indent,trail,space > >+ EOF > >+ git ls-files ":(attr:whitespace=indent\,trail\,space)" >actual && > >+ git ls-files >expect && > >+ test_cmp expect actual > >+' > >+ > > test_done > > Is there a way to verify that `\,` is not escaped by the shell into `,`?
You can run with GIT_TRACE=1 to see the actual string passed to git. '\,' is indeed passed to git with no problems.
> > Maybe also add tests that show \ as the last character and \ > escaping another \.
Done
-- Brandon Williams