From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: New Git hooks for checking file names in commit messages Date: Sun, 23 Apr 2023 10:39:54 +0300 Message-ID: <83mt2zyrlh.fsf@gnu.org> 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> <5c8a8bd8-e0b3-42ac-e278-242379b146e6@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23264"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bjorn.bidar@thaodan.de, arsen@aarsen.me, acm@muc.de, emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 23 09:40:04 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 1pqUKJ-0005oT-G0 for ged-emacs-devel@m.gmane-mx.org; Sun, 23 Apr 2023 09:40:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqUJy-0007oo-Re; Sun, 23 Apr 2023 03:39:43 -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 1pqUJr-0007ln-Mu for emacs-devel@gnu.org; Sun, 23 Apr 2023 03:39:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqUJr-0003QP-9j; Sun, 23 Apr 2023 03:39:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=cV2lf+t8f3YxCMS4c2FDCotgIZiMLKgvIdOnhPyUWcg=; b=lp9xWu+FP35w KpSA0AWX9zJ++hOGQdgc3fpAJRB7M+KykiKxihafKxGwiOhv0ejkzxGSKhKm/ypNH6gpk7Qob/Fnh DSX5COLoX3eLif9G7+Cjlm1GO61UNpaN31f4G/Nca5xAdJYfXMYyskPlPxVnV0aza6Md3Shd6ZPTf yiy75aBzgxuI4G4iVCGGaC+pGs8rccSuKm+cjU2cltsTPS2hLLv6qgnpGkis/7cJMe0Gn0vorXgeA 7GOU3M9YUMAZ3j1wmgoonUetNySQHvNECmz01aDJWJBcnoUUO5W91BZbkSW7zEL3eBkR87n2/PboZ qW02Ca0ceB2rjvV0yXwTyA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqUJp-0004Uv-4b; Sun, 23 Apr 2023 03:39:34 -0400 In-Reply-To: <5c8a8bd8-e0b3-42ac-e278-242379b146e6@gmail.com> (message from Jim Porter on Sun, 23 Apr 2023 00:19:24 -0700) 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:305600 Archived-At: > Date: Sun, 23 Apr 2023 00:19:24 -0700 > Cc: bjorn.bidar@thaodan.de, arsen@aarsen.me, acm@muc.de, emacs-devel@gnu.org > From: Jim Porter > > (I forgot to reply to this part of the message previously...) > > On 4/22/2023 11:11 PM, Eli Zaretskii wrote: > > But if so, what do you want the user who does the merge do? The log > > messages of past commits cannot be amended, so this would simply > > preclude people from pushing merges and/or force them to use the > > "--no-verify" switch. For example, a frequent situation for merges is > > a merge from the release branch to master -- if one or more of the > > commits being merged has bad log messages, we don't want to block the > > merge, because nothing can be done about those bad messages at the > > time of the merge. > > I wonder if we should get rid of the pre-push hook entirely then. While > a committer can theoretically amend old commits prior to the merge, this > is messy, a lot of work, and could cause other problems too. "git commit --amend" is not a lot of work. I do it all the time when applying patches by others, because they frequently have mistakes and omissions. > This would mean that a committer sees a warning about bad log messages > (at post-commit time), but it doesn't actually prevent them from doing > anything. A warning might be too easy to ignore, but maybe it's better > than being silent about it. I'm not sure what to do here... A warning that doesn't preclude a commit from being pushed is much less useful, IMO.