Commit Messages

Christopher Nielsen mascguy at rochester.rr.com
Wed Jul 19 13:02:48 UTC 2023


> From: Fred Wright
> Date: 2023-07-15 18:57:46
> 
> In recent times, commit messages failing to conform to the guidelines have been becoming more common - specifically, the failure to include a blank line after the summary. The guidelines even state briefly why this matters, though perhaps not emphatically enough. Recent offenders are:
> 
> 	2d9585490dc87249c189c211a228984b3a3830c7
> 	331c484f0c10d378bcbf011fa14cb7fc0e1768be
> 	f5ce144934601cc243df6e02b2d47b7956acd335
> 	b395f71013212e625fb96051bcc9a31aa0b5bd26
> 
> The standard git tools split a commit message into a summary (a.k.a. subject) and a body, with the first blank line being the division point. In format strings, these are %s and %b, respectively. Some third-party git tools limit the summary to the first line, so people using such tools may not even notice the error, but such tools shouldn't be the standard. The output of commands like "git log --oneline" and "git branch -v" becomes quite annoying with this error.

Sorry folks, completely forgot about the Git convention regarding a blank line. I shall endeavor to include said line separator, in future commits.

As for enforcing this via a pre-commit hook, sounds good to me.


More information about the macports-dev mailing list