by red_dinosaur · 7y ago · 0 comments
Also, there's a lot of unnecessary stuff in there. Capitalization and imperative? Not at the top of my list.
The relevant points are nicely summarized by Linus Torvalds: https://github.com/torvalds/subsurface-for-dirk/blob/a48494d...
> Git is strongly opinionated that the author is responsible for line breaks; if you omit them, command line tooling will show it as one extremely long unwrapped line.
In general, this approach is broken by design, because the author cannot know where the commit message is going to be displayed. It might actually be in the context where wrapping at 80 or even at 72 is still not long enough (a tooltip in an IDE, say). Or it might be one where it results in a lot of wasted whitespace. It's much better to fix anything that does not handle wrapping properly to do so, than to impose an arbitrary limit that only really works for one environment.
Or simply using a terminal with multiple windows open. I hard wrap at 50 chars and I haven't died from exertion yet.
Because there are some thing that shouldn't be soft-wrapped. Like code snippets, diffs, formatted output, etc. It's far easier to let the person who write the commit message to decide where to wrap it rather than relying on the recipient's display to do it for them. Linus Torvalds describes the same issue here [1].
[1] https://github.com/torvalds/linux/pull/17#issuecomment-56606....
Use the same spelling conventions as the auto-generated messages seems a reasonable request.
But it does seem like Linux is inconsistent about capitalization. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
So it does. How are people managing to independently get this so wrong? The form used in a commit message isn't an imperative. It's an infinitive. No commands are being issued. This is like a purported grammar book telling you that third-person singular subjects use plural verb forms when the verb is in the past tense. The form is identical (except, in the example, for was), but the statement is obviously incorrect.
In the well-formed sentence
For cyanide to kill you, you need to be exposed to a lethal dose all at once.
What do you think "to kill you" is?Furthermore, idiomatic commit messages are pretty clearly not sentences, so I don't see why you think sentence structure should determine what they contain. And even on your own analysis of how the messages are interpreted (which I agree with), those verbs are infinitive, just as "fix" is infinitive in this dialog:
Q: What is this patch supposed to do?
A: Fix issue #351916.And in the commit message "Add feature X", "add" is likewise an infinitive.