[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New Git hooks for checking file names in commit messages
From: |
Eli Zaretskii |
Subject: |
Re: New Git hooks for checking file names in commit messages |
Date: |
Fri, 21 Apr 2023 18:05:05 +0300 |
> Date: Fri, 21 Apr 2023 13:57:22 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > There's one part that might be surprising, at least initially though:
> > while this is a hook to check commit messages, it actually runs in the
> > post-commit and pre-push phases. This is because we want to examine
> > the full diff of the commit in order to compare against the file
> > entries in the message.[1] As a result, you'll just get an advisory
> > message when you make the commit (it's too late to error out), and the
> > pre-push hook will prevent you from pushing a badly-formatted commit
> > message upstream.
>
> How is this helpful? Telling somebody they've made a mistake is only
> helpful if they can correct it. If "it's too late to error out", it
> will just create annoyance. Immediately after such a commit it is
> possible to use $ git commit --amend, but not later. And preventing
> people from pushing these erroneous commits is, again, not helpful.
It is still helpful, because as long as you didn't push, you can still
do
$ git reset HEAD^
and then fix whatever needs fixing and commit again.
- New Git hooks for checking file names in commit messages, Jim Porter, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, John Yates, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, Jim Porter, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, Jim Porter, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, Eli Zaretskii, 2023/04/22
- Re: New Git hooks for checking file names in commit messages, Jim Porter, 2023/04/22
- Re: New Git hooks for checking file names in commit messages, Eli Zaretskii, 2023/04/22
- Re: New Git hooks for checking file names in commit messages, Jim Porter, 2023/04/22
- Re: New Git hooks for checking file names in commit messages, John Yates, 2023/04/22
Re: New Git hooks for checking file names in commit messages, Alan Mackenzie, 2023/04/21
- Re: New Git hooks for checking file names in commit messages,
Eli Zaretskii <=
- Re: New Git hooks for checking file names in commit messages, Arsen Arsenović, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, Eli Zaretskii, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, Arsen Arsenović, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, Eli Zaretskii, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, Arsen Arsenović, 2023/04/21
- Re: New Git hooks for checking file names in commit messages, Eli Zaretskii, 2023/04/22
- Re: New Git hooks for checking file names in commit messages, Andreas Schwab, 2023/04/21
Re: New Git hooks for checking file names in commit messages, Björn Bidar, 2023/04/21
Re: New Git hooks for checking file names in commit messages, Jim Porter, 2023/04/21
Re: New Git hooks for checking file names in commit messages, Eli Zaretskii, 2023/04/22