3 ms·
I feel a huge pain of resignation when I am forced to use multiple lines to describe a single commit. There is almost no audience for any line of the commit mes
by cardiffspaceman 6y ago
I feel a huge pain of resignation when I am forced to use multiple lines to describe a single commit. There is almost no audience for any line of the commit message other than the first line. As far as line length goes, any practical means of displaying the messages, like gitk or git --oneline, is unfriendly to lengthy lines. Gerrit will display all the lines of the tip commit's commit message, so one can amend that commit to create a summary of the others, but then of course the other commits are not as visible.
The character limits are a real thing in git culture. One could start here, with a question posed by an apparent skeptic:
https://stackoverflow.com/questions/2290016/git-commit-messages-50-72-formatting https://stackoverflow.com/questions/2290016/git-commit-messa...
- u801e 6y ago> There is almost no audience for any line of the commit message other than the first line. git log would definitely show the entire commit message, so I don't see why there would be almost no audience. git blame along with git show or git log -n1 would also allow you to see the rest of the commit message for a particular line in the codebase.
- Silhouette 6y agogit log would definitely show the entire commit message git log could show the entire commit message, but I can't remember the last time I saw any developer whose default format wasn't a single-line one. Presumably there are some people who do prefer to see the whole message every time, and maybe that includes you, but IME that's quite rare.
- u801e 6y agoOne would actually have to make a change to their global git config to set the pretty setting to display oneline or add a bash alias to run git log --oneline. By default, it shows the entire message, and, in my experience, most people aren't going to change the default behavior in one specific case.
- Silhouette 6y agoOne would actually have to make a change to their global git config to set the pretty setting to display oneline or add a bash alias to run git log --oneline. That is true, but I literally can't think of any developer I've worked with in many years who had not done something like that. The typical display in every GUI for git repos that I've come across in recent times is also geared to single-line display, though some of them are marginally better with at least indicating the presence of additional lines than git's own one-line display formats in the CLI. YMMV, and apparently it does, based on your second paragraph.
- cycloptic 6y agoAs someone who has had to dig deep with git blame, I tremendously value a good long multiline commit message. At the very least it can save the trouble of having to dig up some obscure mailing list discussion or bug report to figure out why a change was made, assuming that exists at all. If it doesn't, all you have is the git commits.
- cardiffspaceman 6y agoImagine you followed 50/72 AND the "title" was required to reference "[JIRA-1234]" or "Bugzilla-1234".