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

Re: [PATCH v2] ci: disallow directional formatting

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 4, 2021, 10:19 UTC
Message-ID
<nycvar.QRO.7.76.6.2111041111570.56@tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqk0ho4xo5.fsf@gitster.g>
Hi Junio,
On Wed, 3 Nov 2021, Junio C Hamano wrote:
Show 14 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@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)'
> > +
> > +! git ls-files -z ':(attr:!binary)' |
> > +LC_CTYPE=C xargs -0r git grep -Ele "$(LC_CTYPE=C.UTF-8 printf "$regex")" --
>
> One thing for the future, and one thing for the present.
>
>  - Do some languages we would add to po/ hierarchy in the future
>    possibly want to use these sequences as legitimate contents?

I mulled over that. And I think you're right. If a right-to-left translation needs to refer to, say, a `git` invocation, the part that shows the commandline surely would need to be guarded within directional formatting code points. We currently only have translated messages that read left-to-right, for example we lack Arabic and Hebrew translations. Those would be likely to contain such code points on purpose.

I therefore added `:(exclude)*.po` to the command.
Show 7 quoted lines
>  - Do we need ls-files?
>
>
> For the latter, shouldn't the attribute-based pathspec work just
> fine with "git grep"?  i.e.
>
>     git grep -l -E -e $pattern -- ':(exclude,attr:binary)'
D'oh. You're right! I fixed it.

Ciao, Dscho

Previous: Junio C HamanoNext: Johannes Schindelin via GitGitGadget
Message 12 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.