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: Sat, 22 Apr 2023 12:52:58 -0700 Message-ID: <0a76fcd4-df69-56e0-ba90-30dc211ad56e@gmail.com> References: <838rel46ou.fsf@gnu.org> <865y9ptfa3.fsf@aarsen.me> <83354t44kn.fsf@gnu.org> <875y9p2h3u.fsf@thaodan.de> <83h6t82yao.fsf@gnu.org> 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="4052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arsen@aarsen.me, acm@muc.de, emacs-devel@gnu.org To: Eli Zaretskii , =?UTF-8?Q?Bj=c3=b6rn_Bidar?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 22 21:53:53 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 1pqJIu-0000tF-Us for ged-emacs-devel@m.gmane-mx.org; Sat, 22 Apr 2023 21:53:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqJI9-0003Hq-LH; Sat, 22 Apr 2023 15:53:05 -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 1pqJI8-0003Hg-DG for emacs-devel@gnu.org; Sat, 22 Apr 2023 15:53:04 -0400 Original-Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqJI6-0000js-Cx; Sat, 22 Apr 2023 15:53:03 -0400 Original-Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-63b4bf2d74aso2665883b3a.2; Sat, 22 Apr 2023 12:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682193180; x=1684785180; 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=206DzNOmf4k+4xmFSpwgFJ1JAprk9wWu/sTcrVl3PwM=; b=TUTUn1TZaX5dAuU/8osXilA+q+i4yZGvBNBOBqPq5Hz4cCwUB01hic/HNgV826d64W NtxuterKiijKGnfH0P/5kDOJBfISDCV+WXVxs1sKxIdicy/nq7+B4zY71nZqK6psVOE0 n/QavsjXwG+lywQ/kK5+rXaRxilFYPBTR7jbpN4WBw0pXfGxbW16XEVF+U+d2BiF9+R4 UtFNXC5uNC3UmkpW/elMIsd8zCiBm6yeTneupI9ELhSnX1qdtHamneeCvxA1BKCaG0Yl cYGu5vyH/OlZ7qnYwrDYd8NteDk6+6svPypJODRrHbSMsIGzzQ07rvNl7nAXyHeBKXV1 3xiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682193180; x=1684785180; 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=206DzNOmf4k+4xmFSpwgFJ1JAprk9wWu/sTcrVl3PwM=; b=Cs8pvqxJUZPCSG/Zf8es2SLnCpCWws47O3EerqLHMyFu/7UdbrShEvoaD2SUvLOZ0k poyRbxEZ9bDD4cfuGvVcl5OXVRG8WI64KPCeTHUNDqyLawoD1cPQE68js90UrSDhccnc YbeY+wZ1u5g8Xfs0QyGKvj+Cwk47QLRcPeWdMoYThjxbdVJWT80QSmX88GLnbIcMBfTO TNSSNzGDW3BSBog2zuDb91vabF3P3UIEaFyoZkxzBpvSZE7rfVI1HtU1akAxnsx54nU0 03z4ZEkj1gvalN+NrsH9OXCgXheA8yKrMZMLlHZiYMTlo+uwya2Hj7KQyq8RJjabKaLo G8eQ== X-Gm-Message-State: AAQBX9cMyPIK3/JcJ+5LB/HTekqWJ6cbT4Bw/EoKdzs+vYqHsbtY+TRt 3aublWBQhfUpMxGCoq1s26wWhWbLTDCCvQ== X-Google-Smtp-Source: AKy350b5tzXQ/PwOgXYrp9T8u9IMj67fv+7+9BsN1u9GCu1UC37+Gnv7hkdaJC4tqemUwKltYJQpsQ== X-Received: by 2002:a05:6a20:258c:b0:ef:f558:b76 with SMTP id k12-20020a056a20258c00b000eff5580b76mr13844899pzd.5.1682193180238; Sat, 22 Apr 2023 12:53:00 -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 p11-20020a056a0026cb00b0063a04905379sm4847785pfw.137.2023.04.22.12.52.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Apr 2023 12:52:59 -0700 (PDT) Content-Language: en-US In-Reply-To: <83h6t82yao.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=jporterbugs@gmail.com; helo=mail-pf1-x433.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:305587 Archived-At: On 4/22/2023 12:03 AM, Eli Zaretskii wrote: >> From: Björn Bidar >> Should branches be checked by these hooks before they are merged into >> master/version branches? > > No. We don't enforce these rules on branches from which Emacs > tarballs will not be produced. The commit log message which matters > for those is the one of the merge-commit when the branch is landed on > master. I'll make sure this works. I do think it's useful to check commits on all branches, since we won't know until the merge how a committer plans to do the merge. For example, you could push a feature branch upstream, and when the time comes to merge it, rebase it onto master. In that case the history is linear, so we'd want to check every commit that was newly-added to master. I'm not exactly sure how the Git log -> ChangeLog -> etc/AUTHORS process works for merge commits, but it shouldn't be too hard to make the Git hooks be compatible with that process. (For example, we could just detect if we're pushing a merge commit and then stop validating any commits-to-be-pushed prior to that.) Of course, we could also say that it's still useful to validate all those commits anyway, since it keeps our commit history better-formatted. If there's ever a case where these new hooks do the wrong thing, we can just run "git push --no-verify" to ignore the hooks. We're the humans, so we have the final word over the computer, after all. :)