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: Sun, 23 Apr 2023 00:07:49 -0700 Message-ID: <10f5fa75-f076-228d-5ad7-1aaba8b98d47@gmail.com> References: <838rel46ou.fsf@gnu.org> <865y9ptfa3.fsf@aarsen.me> <83354t44kn.fsf@gnu.org> <875y9p2h3u.fsf@thaodan.de> <83h6t82yao.fsf@gnu.org> <0a76fcd4-df69-56e0-ba90-30dc211ad56e@gmail.com> <83v8hnyvou.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1031"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bjorn.bidar@thaodan.de, arsen@aarsen.me, acm@muc.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 23 09:09:01 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 1pqTqH-00006U-7p for ged-emacs-devel@m.gmane-mx.org; Sun, 23 Apr 2023 09:09:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqTpI-0007wv-UO; Sun, 23 Apr 2023 03:08:01 -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 1pqTpD-0007vr-0K for emacs-devel@gnu.org; Sun, 23 Apr 2023 03:07:55 -0400 Original-Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqTpB-0004RB-DN; Sun, 23 Apr 2023 03:07:54 -0400 Original-Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-24b89b9a72cso696873a91.1; Sun, 23 Apr 2023 00:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682233670; x=1684825670; 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=zXBcHiMaFgWg9CKnYodiWiWgsuGTUNhJ3bBNZfTDKoI=; b=YH4iT9cXSlMCf1joInPBJ8nU42FAB5To4SIscKzsTHReeE5P+0/0Hvy9yxJEpo2FFl rAAtBOxlWKyKNWRHL6TRyLQa4H/aKJx/1BsbypYgRW0rYbM2ERqIZgWV+n9JS6gFEn6J bxNTnP62CCz4jllPhPNSqLs0yPwFFt5e3pmxNso3/086mJTz2+u5f7fEhr+lBGYAx0sz 6eMZFT3FtuRKiOzOPxmKlQrmnKBUjurYjghTvbO1EfOxINBfGTAIY613ZrjbyvFGMXRH jGwGj5vJnCs0c3bShlIkNusvWcpuRvfZrsQy3u1YqKX9QSMZtYHN07ZisIhQO93+/tvj Egzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682233670; x=1684825670; 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=zXBcHiMaFgWg9CKnYodiWiWgsuGTUNhJ3bBNZfTDKoI=; b=Dno3YWinuB2QOCBefunGsc/6nGPi7dLcZN97JbZNHsezliMpxN8D/gszJ2raGTbc6U HweGzymPhE3QBkpeVK33/jm5H7Vsm40I6SjXvGUQetoRVpcz33wMSO1xRbu3kYN77ApW meukA+o1nbmcsUgpd4mFMuksEztT7NM5BdppFNkdecoDSH+sEWR5KsLDoFFoluuVNkzl kVqQEiHHaRG6S8JPGn7N2vGeNDkkte50HyvYXMbxQt8E3yTv6x/Ey7K1NR9E6utaT3Uy tVuHyjI+238JLGQ5IL9jQCap4OqPYPaBt3EoI4f+xRp9NYfK7E3oKJAo6wmsO7XWxoyX A4VQ== X-Gm-Message-State: AAQBX9cQi4s+tuYEVAMQZ69SU5NiLOFfLgRMH+cWrkHQ3P6RgoWoFUFX hAt6sYKG1+F60JdfckcT/tVq7dGgcrCVkQ== X-Google-Smtp-Source: AKy350ZzTNIF9EdKXboISm0yDKNDC3GzMgKfZkghDizQI94zp4jgvPyM2V84a2NtPAs2fX2i0oPVzQ== X-Received: by 2002:a17:90b:230f:b0:23d:31c3:c98d with SMTP id mt15-20020a17090b230f00b0023d31c3c98dmr10524137pjb.15.1682233670201; Sun, 23 Apr 2023 00:07:50 -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 s1-20020a17090b070100b0024499d4b72esm6533135pjz.51.2023.04.23.00.07.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Apr 2023 00:07:49 -0700 (PDT) Content-Language: en-US In-Reply-To: <83v8hnyvou.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=jporterbugs@gmail.com; helo=mail-pj1-x1034.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:305597 Archived-At: On 4/22/2023 11:11 PM, Eli Zaretskii wrote: > The risk exists, but the freedom we give developers with log messages > on feature branches is more important. We should not make developing > features more troublesome by enforcing well-formatted log messages for > WIP changes, especially since frequently the commits are just > checkpoints, they don't signify any changes that have a useful > description. So we should not block pushing of branch commits due to > log messages. Ok, it should be easy to restrict the pre-push hook to master/emacs-NN branches. However, just to make sure we're on the same page: the *only* errors that committers will ever see from these hooks is if they listed a file in GNU Change Log format that wasn't in the diff. Anything else is allowed, even a message as simple as, "Do something". > Merge commits usually don't have any meaningful log messages and don't > mention files. You must explicitly add a log message mentioning files > and functions for a merge-commit to have a log message, and we request > that people who land feature branch create a log message describing > all the new/changed things in the merge for that single commit before > you push. Most other merge-commits aren't important in the context of > this discussion. This part should be easy enough to handle: if a commit is a merge commit, we just won't validate any file names listed in the log message. (In theory, we could try, but it would be a lot of effort for something with not a lot of value.) Going back to your previous message, I want to be sure I understand this part: > The commit log message which matters for those is the one of the > merge-commit when the branch is landed on master. Suppose I make commits A, B, and C on a branch, and then merge to master with merge-commit D. Does your message mean that the only commit that ends up in the ChangeLog file is commit D? (Or that commit D is the only one that authors.el looks at?) I was looking for examples of merge commits to test against and found 289b457cac1, merging the 'abort-redisplay' branch. That's in ChangeLog.4 on the emacs-29 branch, as expected. However, I also see commits that appear to be from that branch in the change log too, such as 4b00bc47c7e. I don't see any logic in authors.el to ignore these commits either. Am I just misunderstanding something?