git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] ci: disallow directional formatting

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 8, 2021, 18:49 UTC
Message-ID
<211108.86cznafpke.gmgdl@evledraar.gmail.com>
In-Reply-To
<xmqqpmrf3kjz.fsf@gitster.g>
On Thu, Nov 04 2021, Junio C Hamano wrote:
Show 22 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>>> +# U+202a..U+2a2e: LRE, RLE, PDF, LRO and RLO
>>> +# U+2066..U+2069: LRI, RLI, FSI and PDI
>>> +regex='(\u202a|\u202b|\u202c|\u202d|\u202e|\u2066|\u2067|\u2068|\u2069)'
>>> +
>>> +! LC_CTYPE=C git grep -El "$(LC_CTYPE=C.UTF-8 printf "$regex")" \
>>> +	-- ':(exclude,attr:binary)' ':(exclude)*.po'
>> ...
>>    ! git -P grep -nP '[\N{U+202a}-\N{U+202e}\N{U+2066}-\N{U+2069}]' ':!(attr:binary)'
>
> So you are comparing
>
>  * requiring bash and C.UTF-8 locale to be available
>
> vs
>
>  * requiring git built with PCRE
>
> assuming that "Dscho says doesn't work with PCRE and you say it
> works with PCRE" is resolved?  They seem roughly the same
> difficulty to me.

We can hard depend on a git built with PCRE, since the point of this thing is to run in GitHub CI, Ubuntu builds git with PCRE, and that's unlikely to ever change.

The caveats around PCRE that still somewhat persist around PCRE are due to a misunderstanding, i.e. I think Johannes tried the \uXXXX syntax, which we don't opt git-grep into, but as shown above you can just use the other universally supported PCRE syntax for referring to Unicode codepoints.

Previous: Junio C HamanoNext: Junio C Hamano
Message 16 of 18 in “ci: disallow directional formatting”
  1. ci: disallow directional formattingJohannes Schindelin via GitGitGadget, Nov 2, 2021
  2. Ævar Arnfjörð BjarmasonNov 2, 2021
  3. Taylor BlauNov 2, 2021
  4. Ævar Arnfjörð BjarmasonNov 2, 2021
  5. Johannes SchindelinNov 2, 2021
  6. Ævar Arnfjörð BjarmasonNov 2, 2021
  7. Junio C HamanoNov 3, 2021
  8. ci: disallow directional formattingJohannes Schindelin via GitGitGadget, Nov 3, 2021
  9. Junio C HamanoNov 3, 2021
  10. Ævar Arnfjörð BjarmasonNov 3, 2021
  11. Junio C HamanoNov 3, 2021
  12. Johannes SchindelinNov 4, 2021
  13. ci: disallow directional formattingJohannes Schindelin via GitGitGadget, Nov 4, 2021
  14. Ævar Arnfjörð BjarmasonNov 4, 2021
  15. Junio C HamanoNov 4, 2021
  16. Ævar Arnfjörð BjarmasonNov 8, 2021
  17. Junio C HamanoNov 8, 2021
  18. Ævar Arnfjörð BjarmasonNov 9, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.