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: Mistakes in commit log messages Date: Tue, 11 Apr 2023 21:00:13 +0300 Message-ID: <838rey9u4y.fsf@gnu.org> References: <835ya5m4p0.fsf@gnu.org> <83v8i4arzt.fsf@gnu.org> <838rezardu.fsf@gnu.org> <83edoqa2lc.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26063"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 11 20:00:18 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 1pmIHy-0006XX-IX for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Apr 2023 20:00:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmIHE-0004DS-Pn; Tue, 11 Apr 2023 13:59:32 -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 1pmIHD-0004D5-Iv for emacs-devel@gnu.org; Tue, 11 Apr 2023 13:59:31 -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 1pmIHC-0000Bd-Nm; Tue, 11 Apr 2023 13:59:30 -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=2Mp29d9KhUiJJsVX1NN+WG+MirMnLmCXlh0zD6x4t8M=; b=IIZ3MGyfWAkS 6d4rhNNEltz6HcOvROpzFeQ0R1looj+7SfCfQIek6BBNKQwKC0IUj7L6IRdyMCRGXAbePANuHZ8yu VdKqUYFbTWHshpE2xqaCWqNKIo2fDBvMvr+wtyedrDmf6GEYj5Z+HwG1IwaLIuW2LlumBTGIJEEn/ 0Jp9UvWDc0gmr7TAP/09/iwX2z5IAvQI8gG9811qERVtyxJcvaWPnggafyWWusACGjWtuBo5Kuivt k70U0jZDOuuYfe1v+eCSFVzH13GNqvTpBCKauiTYLDgJT+YAfvLL0oxvlS+dg87lcsRCSMYYfQRj5 a9mx9bfvdSM5GhS4Pv8XYQ==; 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 1pmIHB-00050n-Tg; Tue, 11 Apr 2023 13:59:30 -0400 In-Reply-To: (message from Alan Mackenzie on Tue, 11 Apr 2023 17:20:13 +0000) 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:305242 Archived-At: > Date: Tue, 11 Apr 2023 17:20:13 +0000 > Cc: jporterbugs@gmail.com, emacs-devel@gnu.org > From: Alan Mackenzie > > > > + /^\* [a-zA-Z0-9_.~#-]/ { > > > + nfiles++ > > > + if ((rc = (getline x < $2)) < 0) { > > > + status = 1 > > > + print "File " $2 " cannot be read: [" ERRNO "]" > > > The error message should explicitly mention an error in the file name > > or its leading directories, at least if ERRNO indicates the file does > > not exist. "File FOO cannot be read is too "technical" and doesn't > > explain what we are checking. > > You mean something like: > > print "Error in file or directory name " $2 " [" ERRNO "]" > > ? I mean something like "File " $2 " does not exist; did you make a mistake in its name?" > I'm beginning to get a bit concerned about what happens after a file > has been removed from git, or renamed. This needs to be detected and not flagged as an error. > Maybe I could add another line suggesting how to bypass the checks > in commit-msg. What do you think? No, I think we shouldn't make it easy for people to bypass the test, if we want this to be useful.