summaryrefslogtreecommitdiff
path: root/t/t5515/fetch.br-unconfig_branches-default
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2017-03-13 11:23:22 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-03-13 15:28:56 -0700
commitc5af19f9ab4cd8582689ca9d9c84f188f4442d10 (patch)
treef148fdc5c2b8d223227a6328dc3cb53c8c06dd7e /t/t5515/fetch.br-unconfig_branches-default
parentpathspec: allow querying for attributes (diff)
downloadtgif-c5af19f9ab4cd8582689ca9d9c84f188f4442d10.tar.xz
pathspec: allow escaped query values
In our own .gitattributes file we have attributes such as: *.[ch] whitespace=indent,trail,space When querying for attributes we want to be able to ask for the exact value, i.e. git ls-files :(attr:whitespace=indent,trail,space) should work, but the commas are used in the attr magic to introduce the next attr, such that this query currently fails with fatal: Invalid pathspec magic 'trail' in ':(attr:whitespace=indent,trail,space)' This change allows escaping characters by a backslash, such that the query git ls-files :(attr:whitespace=indent\,trail\,space) will match all path that have the value "indent,trail,space" for the whitespace attribute. To accomplish this, we need to modify two places. First `parse_long_magic` needs to not stop early upon seeing a comma or closing paren that is escaped. As a second step we need to remove any escaping from the attr value. Based on a patch by Stefan Beller <sbeller@google.com> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/fetch.br-unconfig_branches-default')
0 files changed, 0 insertions, 0 deletions