From: Alan Mackenzie <acm@muc.de>
To: Jim Porter <jporterbugs@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Mistakes in commit log messages
Date: Wed, 12 Apr 2023 09:32:30 +0000 [thread overview]
Message-ID: <ZDZ6rkXsSEc76lPl@ACM> (raw)
In-Reply-To: <319d616d-9230-0a82-331f-0f57488e4c80@gmail.com>
Hello, Jim.
On Tue, Apr 11, 2023 at 11:31:55 -0700, Jim Porter wrote:
> On 4/11/2023 7:01 AM, Alan Mackenzie wrote:
> >
> > + /^\* [a-zA-Z0-9_.~#-]/ {
> > + nfiles++
> > + if ((rc = (getline x < $2)) < 0) {
> > + status = 1
> > + print "File " $2 " cannot be read: [" ERRNO "]"
> > + }
> > + close($2)
> > + }
> One thing to be careful of here (which is why I did the 'match'/'substr'
> dance in my patch) is that we need to be able to handle lines like this
> correctly:
> * some/file.el: New file.
Yes, you're right, thanks. These little things are always tripping me
up.
[ .... ]
> Also, using 'getline' will work for checking files, but not directories.
> I'm not sure this ever comes up in practice, but it might occur once in
> a while if we import a large package into the Emacs tree. We could do a
> bit of feature-checking and upgrade to using 'stat' if we have a newish
> gawk. That way, gawk users would get proper checks for this (rare) case.
> (This might not be strictly necessary.)
This, too.
> Finally, I think it would make sense to have this be a purely advisory
> warning for now so that we could check it into the Emacs tree soon-ish.
> As Eli suggests, we can try running with this hook locally, but since
> I've already added some Lisp code to generate the changelog for my
> workflow, I'm probably never going to trigger this myself. If this check
> is just a warning, I think we could be a little more aggressive in
> merging this, since it shouldn't break anyone's workflows.
I think Eli's already decided the idea of checking for the existence of
files isn't a good one, because of the problem of deleting and renaming
files.
But also, I think having the script just warn is not useful. Git
purposefully makes it impossible to correct mistakes in a commit
message, so we need to make sure the things are as correct as possible
to begin with.
--
Alan Mackenzie (Nuremberg, Germany).
prev parent reply other threads:[~2023-04-12 9:32 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <835ya5m4p0.fsf@gnu.org>
[not found] ` <ZDPkykCsW3i30UR9@ACM>
[not found] ` <83v8i4arzt.fsf@gnu.org>
[not found] ` <CANh=_JF0CEPDsWZSuyy9ymByma2LxcypP90O3-LQ+KhoJ8cqvg@mail.gmail.com>
[not found] ` <CANh=_JEO4-E79dPCLc3cRLi7=ftAzc+H1FC46eck1vJN3TD3Sg@mail.gmail.com>
2023-04-11 6:02 ` Mistakes in commit log messages Eli Zaretskii
2023-04-11 14:01 ` Alan Mackenzie
2023-04-11 14:57 ` Eli Zaretskii
2023-04-11 17:20 ` Alan Mackenzie
2023-04-11 18:00 ` Eli Zaretskii
2023-04-11 18:31 ` Jim Porter
2023-04-11 18:45 ` Eli Zaretskii
2023-04-11 19:27 ` Jim Porter
2023-04-11 19:36 ` Eli Zaretskii
2023-04-12 0:20 ` Jim Porter
2023-04-13 6:18 ` Jim Porter
2023-04-13 6:49 ` Eli Zaretskii
2023-04-13 7:47 ` Robert Pluim
2023-04-15 3:41 ` Jim Porter
2023-04-15 5:45 ` Jim Porter
2023-04-15 7:15 ` Eli Zaretskii
2023-04-15 10:44 ` Alan Mackenzie
2023-04-15 11:00 ` Eli Zaretskii
2023-04-21 22:16 ` Filipp Gunbin
2023-04-15 20:54 ` Jim Porter
2023-04-15 21:23 ` Jim Porter
2023-04-16 5:43 ` Eli Zaretskii
2023-04-16 20:06 ` Jim Porter
2023-04-16 20:19 ` Michael Albinus
2023-04-17 2:22 ` Eli Zaretskii
2023-04-17 7:28 ` Michael Albinus
2023-04-21 4:59 ` Jim Porter
2023-04-15 7:08 ` Eli Zaretskii
2023-04-12 9:41 ` Alan Mackenzie
2023-04-12 10:14 ` Eli Zaretskii
2023-04-12 9:32 ` Alan Mackenzie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZDZ6rkXsSEc76lPl@ACM \
--to=acm@muc.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jporterbugs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).