From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9207DC433F5 for ; Wed, 3 Nov 2021 18:00:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6363B60FC2 for ; Wed, 3 Nov 2021 18:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbhKCSC7 (ORCPT ); Wed, 3 Nov 2021 14:02:59 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:50469 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbhKCSC6 (ORCPT ); Wed, 3 Nov 2021 14:02:58 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 2E9EB165DB3; Wed, 3 Nov 2021 14:00:22 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=ES5ZZUdlquywO0t9A3ZR1IADvaCasy66TnuxFj PRBV8=; b=g4hHO//UYl1IxNWrTAYLcpC8pZnrOXWvdiIJmz4HsyeUsvhBzii5l9 q3ilSV7bUJVLrsjxEIfWIhIJ2slOdTlW2QMAmB6pSJ7VIvEw/Tfxz55+SCWR23cE GLqMlb3GaNGfvmLB3N8mDWFxJl4GwKAxeZttCa/GNaXVwlzAd7DJo= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 27297165DB2; Wed, 3 Nov 2021 14:00:22 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [104.133.2.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id D34E8165DA5; Wed, 3 Nov 2021 14:00:18 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Johannes Schindelin via GitGitGadget" Cc: git@vger.kernel.org, =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Taylor Blau , Johannes Schindelin Subject: Re: [PATCH v2] ci: disallow directional formatting References: Date: Wed, 03 Nov 2021 11:00:17 -0700 In-Reply-To: (Johannes Schindelin via GitGitGadget's message of "Wed, 03 Nov 2021 12:23:55 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: E7F0366A-3CCF-11EC-95ED-98D80D944F46-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Johannes Schindelin via GitGitGadget" 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