Thread (2 messages) flat view 2 messages, 2 authors, 2021-11-04

Re: [PATCH v2] ci: disallow directional formatting

From: Junio C Hamano <hidden>
Date: 2021-11-03 23:38:55

"Johannes Schindelin via GitGitGadget" [off-list ref]
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?

 - 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)'
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help