Re: [PATCH v2] ci: disallow directional formatting
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 3, 2021, 18:00 UTC
- Message-ID
- <xmqqfssd6rwu.fsf@gitster.g>
- In-Reply-To
- <pull.1071.v2.git.1635942236065.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> 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.
Show 9 quoted lines
> + > +# 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