{ "uuid": [ { "value": "eb1fecb1-6d0c-413a-b546-2c2fcf320d94" } ], "langcode": [ { "value": "en" } ], "type": [ { "target_id": "daily_email", "target_type": "node_type", "target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7" } ], "revision_timestamp": [ { "value": "2025-05-11T09:00:12+00:00" } ], "revision_uid": [ { "target_type": "user", "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" } ], "revision_log": [], "status": [ { "value": true } ], "uid": [ { "target_type": "user", "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" } ], "title": [ { "value": "Which commit has the largest message?" } ], "created": [ { "value": "2024-05-21T00:00:00+00:00" } ], "changed": [ { "value": "2025-05-11T09:00:12+00:00" } ], "promote": [ { "value": false } ], "sticky": [ { "value": false } ], "default_langcode": [ { "value": true } ], "revision_translation_affected": [ { "value": true } ], "path": [ { "alias": "\/daily\/2024\/05\/21\/which-commit-has-the-largest-message", "langcode": "en" } ], "body": [ { "value": "\n
I write and advocate for others to write<\/a> detailed Git commit messages within the subject body to provide context and information about why the commit was needed, what other options were considered, any consequences or knock-on effects there could be, or even code snippets or pseudo code.<\/p>\n\n Recently, I was curious to know which commit in a repository has the longest commit message, what code has changed in that commit, and who wrote it.<\/p>\n\n I was hoping for a command like It's a bash script that loops over the commits in the repo, calculates the length of each message, sorts them and shows the commit with longest message.<\/p>\n\n It was an interesting task and shows examples of using various UNIX commands and Linux coreutils, such as The longest in this website's code base is 546 characters<\/a>, which is fairly small compared to some of my messages in other projects.<\/p>\n\n What's the longest commit message in the repository you're working in?<\/p>\n\n ",
"format": "full_html",
"processed": "\n I write and advocate for others to write<\/a> detailed Git commit messages within the subject body to provide context and information about why the commit was needed, what other options were considered, any consequences or knock-on effects there could be, or even code snippets or pseudo code.<\/p>\n\n Recently, I was curious to know which commit in a repository has the longest commit message, what code has changed in that commit, and who wrote it.<\/p>\n\n I was hoping for a command like It's a bash script that loops over the commits in the repo, calculates the length of each message, sorts them and shows the commit with longest message.<\/p>\n\n It was an interesting task and shows examples of using various UNIX commands and Linux coreutils, such as The longest in this website's code base is 546 characters<\/a>, which is fairly small compared to some of my messages in other projects.<\/p>\n\n What's the longest commit message in the repository you're working in?<\/p>\n\n ",
"summary": null
}
]
}git shortlog --summary --all<\/code> (which shows all authors to a codebase and their number of commits), but couldn't find one, so I wrote a script to do it<\/a>.<\/p>\n\n
find<\/code>,
cut<\/code>,
sort<\/code> and
wc<\/code> in combination with Git.<\/p>\n\n
git shortlog --summary --all<\/code> (which shows all authors to a codebase and their number of commits), but couldn't find one, so I wrote a script to do it<\/a>.<\/p>\n\n
find<\/code>,
cut<\/code>,
sort<\/code> and
wc<\/code> in combination with Git.<\/p>\n\n