From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: New Git hooks for checking file names in commit messages Date: Fri, 21 Apr 2023 10:44:10 -0700 Message-ID: <5e494275-d253-118a-4a40-86d252285a23@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------wQqv3cEqRc4OFDSZYu9KlgCa" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35592"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, eliz@gnu.org To: John Yates Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 21 19:44:57 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppuoY-0008z3-W4 for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Apr 2023 19:44:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppunw-0004ra-9g; Fri, 21 Apr 2023 13:44:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppunt-0004oY-Uv for emacs-devel@gnu.org; Fri, 21 Apr 2023 13:44:13 -0400 Original-Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppunr-0005ql-1n; Fri, 21 Apr 2023 13:44:13 -0400 Original-Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-63b4e5fdb1eso3053949b3a.1; Fri, 21 Apr 2023 10:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682099049; x=1684691049; h=in-reply-to:references:cc:to:from:content-language:subject :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=UjyMP5MhjTizYRB5PpPmVX+9GSiK9PEuyIKZ9g9ONnA=; b=B71Z7niJEn1/wSeptmpjsOEbjzbS0t1XpMlIm92fK/95O1OlRGrJaScktBp53cg8rb Ik4GBplYzxlTrH5eSINyvIWy+Il4/Zgl8qZ/pCC5cW7j+AiQ/dC688POfuDmBz6DEFBL 5UCIDkqyx1jF1N2HoEJ/ASo3J/duqbqmYsKkD1F9S/5ZH6h2bZYEyKIEYlfXy/381ZeQ TTDRQ6QAN+I6625URM3rtFBfIwKy1fcMuSYCNOmejv8u2fyVGrFZn51i0TVAcwgOKxPF ZtYOSWpum2IvdG+TaKSDmDSfNhVKIb/mg5a5rz/LWq1a2TRTyCBugGay3mKza/tnjchP lyMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682099049; x=1684691049; h=in-reply-to:references:cc:to:from:content-language:subject :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=UjyMP5MhjTizYRB5PpPmVX+9GSiK9PEuyIKZ9g9ONnA=; b=V5Mo9suf8kst3rOLxSK4YxqNxvIflz//rCg4tYRrVmVI0QfUKuywfv3dD/rckb89re Gi1MtXYDuQHvflztnY8cVsIccfavMz24Saik+o67Eswov+D1venWSRQe7GFjTLZ1mmYe TpOAZpmnsjyENNtseG8Dtvm29C17l1la0kMwFqs9czBFCUMtURX3bH+/XFN3e20/jKlK 9QuagZ/jeoR+PPiTdV+dRS26Ln/84qHEF49JBvvz5xLu+0knf3K6gI/qmbMdw/bIz3yb aMylNRjtokc8zIXWM+nkTnvKyeLN1R3zKgp3b5RIOKv62uRuNBgoY5ST/yAATaA9f3Ew cc9w== X-Gm-Message-State: AAQBX9cdYoJFi1f9dwgW39EERR3oR/Q9LLKlZZQFtoTqFZJEgrr/vhT4 QcdyQVwitaqDJs6+P0MzSEm2uRETvibXhA== X-Google-Smtp-Source: AKy350ZqtppmqC5BESBIeIPBFynLTei9MfGE87cTG6Pq2DRonnT9U321eyWiNVSRetkPnAhdGzXAfQ== X-Received: by 2002:a05:6a00:1989:b0:63a:75a4:b2d4 with SMTP id d9-20020a056a00198900b0063a75a4b2d4mr7580916pfl.24.1682099049390; Fri, 21 Apr 2023 10:44:09 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id 123-20020a621881000000b00638965d4248sm3191549pfy.184.2023.04.21.10.44.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Apr 2023 10:44:08 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=jporterbugs@gmail.com; helo=mail-pf1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305558 Archived-At: This is a multi-part message in MIME format. --------------wQqv3cEqRc4OFDSZYu9KlgCa Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/21/2023 9:44 AM, Jim Porter wrote: > I tried to be as lenient as possible with the Git hooks so that they > only catch things that would be a problem for admin/authors.el, though > there are some small differences regarding multi-line lists of files. After thinking about this for a bit, I came up with a way to match admin/authors.el in the hooks (at least, to the best of my knowledge). This should mean that the hooks will report exactly the same errors as admin/authors.el. With this patch, there's no restriction on putting a "*" in the first column of a commit message, so long as that paragraph doesn't also have a ":" in it (just like admin/authors.el). Eli, what do you think? I've run this against the 5000 latest commits and the results look right (though I haven't looked as thoroughly as last time). --------------wQqv3cEqRc4OFDSZYu9KlgCa Content-Type: text/plain; charset=UTF-8; name="0001-Improve-the-logic-of-the-file-entry-Git-hooks-to-mat.patch" Content-Disposition: attachment; filename*0="0001-Improve-the-logic-of-the-file-entry-Git-hooks-to-mat.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSAyZWQ5ZTk0YmYxMDIwNmY5ZmM3MDZmMzQ3YjFlODc3YTYyMjFlNjc2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gUG9ydGVyIDxqcG9ydGVyYnVnc0BnbWFpbC5j b20+CkRhdGU6IEZyaSwgMjEgQXByIDIwMjMgMTA6MDY6NDkgLTA3MDAKU3ViamVjdDogW1BB VENIXSBJbXByb3ZlIHRoZSBsb2dpYyBvZiB0aGUgZmlsZSBlbnRyeSBHaXQgaG9va3MgdG8g bWF0Y2gKIGFkbWluL2F1dGhvcnMuZWwKCiogYnVpbGQtYXV4L2dpdC1ob29rcy9jb21taXQt bXNnLWZpbGVzLmF3ayAoY2hlY2tfY29tbWl0X21zZ19maWxlcyk6CkFjY3VtdWxhdGUgZmls ZSBlbnRyaWVzIG92ZXIgbXVsdGlwbGUgbGluZXMuCi0tLQogYnVpbGQtYXV4L2dpdC1ob29r cy9jb21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