Thread (1 message) 1 message, 1 author, 2021-11-03

Re: [PATCH v2] ci: disallow directional formatting

From: Junio C Hamano <hidden>
Date: 2021-11-03 18:00:24

"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
+# Note: we need to use Bash here because its `printf` interprets `\uNNNN` as
+# UTF-8 code points, as desired. Running this script through Ubuntu's `dash`,
+# for example, would use a `printf` that does not understand that syntax.
Wow, the situation is ugly and the solution is understandable.

Shouldn't we call this script *.bash instead of *.sh then, though?

Other than that, looks good to me.  Thanks.
+
+# 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")" --

base-commit: 0cddd84c9f3e9c3d793ec93034ef679335f35e49
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help