emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mistakes in commit log messages


From: Eli Zaretskii
Subject: Re: Mistakes in commit log messages
Date: Tue, 11 Apr 2023 17:57:35 +0300

> Date: Tue, 11 Apr 2023 14:01:48 +0000
> Cc: Jim Porter <jporterbugs@gmail.com>, emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> +  /^\* [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.

Also, I'm not sure what is CWD when this script runs.  Suppose I
invoke "git commit" from a subdirectory of the tree root -- does this
find files in that case?

> +    if (!nfiles) {
> +      print "No file lines in commit message"
> +      status = 1

This was never an error before, so shouldn't be an error now.  Log
messages saying just

  Fix last change

are quite common, and I don't want to disallow them.

In any case, I suggest that you (and maybe others) try running with
this for some time, to make sure there are no regressions.

Thanks.

P.S. Is 'getline' available in non-GNU Awk's?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]