To nitpick, the git commit already contains information about which files are affected; adding it explicitly to the commit message does not add value and, like comments, may be incorrect. I like the angular style guide's concept of "scope", like, what category or module of the application does it apply to.
That said, an "utils" file is often a smell in code organization.
> the git commit already contains information about which files are affected;
Contra: while this is true, it's worth considering how 'information about which files are effected' scales when examining the history of a repo. A commit message that simplifies and clarifies the intent is more useful than one that requires a future reader to read each git commit in full to understand the effect.
Re:Git Things
by forgotmypw17 on Tuesday January 02, 2024 @11:27AM
(#38843410)
> the git commit already contains information about which files are affected
Right, but this is not always the same as the files which I intended to be affected, and the matching of the two is the sanity check here.
utils was just an example filename.
Even for the most minor commits, including "improve comment formatting ; utils.pl" allows skimming that message and comparing it to the actual commit.
It also helps me be aware of what I'm doing, pointing and calling style.
https://en.wikipedia.org/wiki/Pointing_and_calling