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 09:44:55 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15895"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: John Yates Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 21 18:45:47 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 1ppttK-00040p-RO for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Apr 2023 18:45:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pptsZ-00031e-Hz; Fri, 21 Apr 2023 12:44:59 -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 1pptsY-0002xv-4U for emacs-devel@gnu.org; Fri, 21 Apr 2023 12:44:58 -0400 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pptsW-0003Lh-DJ for emacs-devel@gnu.org; Fri, 21 Apr 2023 12:44:57 -0400 Original-Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-63b50a02bffso2157501b3a.2 for ; Fri, 21 Apr 2023 09:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682095495; x=1684687495; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=/2JpNL37rxoNVx6oNBJfUbcnCqwIblc15xaBD4fc7sw=; b=QzwjoZdmjeMN0rNlBskh2bU15E/bewcs30f03K0EljHEZgxe6x2m3Ywa8bvLVPMcKL tEM3OSGaJIeBheQlctbAHBbDbT7NBZmNNktK07+6L0de94A6fY4nvFBDfI5euTz5chT6 4fuk4ixS5Tlp88kSSHiLMyUlpoyBVw4qTqse8gEGowhiBFePGALgPnTyvfB02OlPiery hK6ENfouZAneYWrTHDhWHcaefgwlpJhEIV6J/ZzI9s1jM5nKe1uHm3xzsvyBJ+m1q3AL acVRRU4+7Jt37sXexPwWjDRmLyZxTZuUg7fxSPFrrP8ZEyM6mv5njDoFO1rlX1oWP2Xn eQ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682095495; x=1684687495; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/2JpNL37rxoNVx6oNBJfUbcnCqwIblc15xaBD4fc7sw=; b=QGlIdj6Sy0t6NJFV8hqhWv0x24Ymi0KeoCqQ+m5+obOC+Rtu6rl6DfrNJO3e2aep0u Jlhlv9paW/0CFwasVx/zkOb4HVzjRtTFrRcaTPtp/SHvFmlUbJMhP8iyfGfdTodBwq4w gG4d9x6JJP+TdRp/Uw1/0a2v+gA30Zt5fxdz5xmRsTdc/ksWGvzAgjZXXBKzhAd5wvze 77T+oRI1MxKHrtYpXTgFyJG19BOwbsBVNW11JLaCXglEyiXXOf1lqgstBWqggsHvXxs/ 2XHP58sTOySXDDcAXjuFtFftDEkm/BJbKe/7Mpj+fM04E2MW+CDfMFGg+9hTJv65kEHT m3vg== X-Gm-Message-State: AAQBX9c7sZEYOAU1IjkAQEQC12t/rM3pn1CrCsNRGvNkAbbzuKUSeCTY xFakZYmAT3oIahNPOOP0Sjc= X-Google-Smtp-Source: AKy350YAzNvddkSnjs2RcQk71sA5vszMeO6/bhDrBVf/IoXIpYfNJ5WhCBZngBPQ7avXKnbBrWN+8g== X-Received: by 2002:a05:6a00:15c9:b0:63b:854e:8459 with SMTP id o9-20020a056a0015c900b0063b854e8459mr7755234pfu.31.1682095494768; Fri, 21 Apr 2023 09:44:54 -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 g1-20020a056a00078100b005810c4286d6sm3198957pfu.0.2023.04.21.09.44.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Apr 2023 09:44:54 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=jporterbugs@gmail.com; helo=mail-pf1-x42d.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:305556 Archived-At: On 4/21/2023 5:05 AM, John Yates wrote: > On Fri, Apr 21, 2023 at 12:55 AM Jim Porter wrote: >> >> This also means that if you want to use a "*" for a bulleted list of >> sentences, you should do something to make it not look like a file >> entry. For example, " *" is ok. > > I am not wild about this change in commit message syntax. It clashes > with all my other uses of git. It's not a change in syntax (at least, it's not *intended* to change the syntax). Commit messages for Emacs should all use the GNU Changelog format so that they can be imported into the actual ChangeLog files. These then get used to update etc/AUTHORS via the admin/authors.el script, which looks at the file entries in the ChangeLog files.[1] This ended up being a problem for Eli when preparing the Emacs 29 prerelease tarball, since there were a bunch of incorrect commit messages that required several hours of manual intervention to fix. (Since I was one of the people Eli emailed off-list to inform us that we'd made these errors, I thought I should take some time to help prevent this issue in the future.) 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. > Do you allow more than one file on a bulleted line? Yes. admin/authors.el allows this, so the Git hooks also allow it. (I don't personally like it though.) In principle, we could copy over the admin/authors.el heuristic though: a line beginning with "*" starts a file entry *only if there's a ":" somewhere following it, up to the next whitespace-only line*. This would help avoid some false positives, but it also fails to catch errors where committers forgot to add the ":", which I saw on several occasions when looking over historical commits. [1] That's a bit indirect (you could update etc/AUTHORS from the git logs directly), but it lets maintainers modify the ChangeLog if necessary before updating etc/AUTHORS, e.g. to fix authorship of a change or to remove entries if they were backed out for some reason.