Earlier quoted context omitted.
> The point is that people shouldn't be littering their text with hard line breaks just to support software that can't do word-wrapping properly. How can the software guess whether a given line should be wrapped (text), should not be wrapped (code), should be wrap-indented (list item) or should be wrap-prefixed (quote block) when it's only given raw bytes assumed to be text without further information?
Markdown renderers seem perfectly capable of this. git wouldn't even need to disambiguate asterisk for lists vs. asterisk for emphasis.
What a good commit message looks like (2011)
71–80 of 100 posts
Re: What a good commit message looks like (2011)
#72One problem with this is that git gets used as a deployment tool as well as a version control system. Trying to get something to run on Heroku involved making lots of small changes just to get things to run on the server the same as on my dev machine. When you do that 10 or 20 times the commit message become somewhat meaningless.
Re: What a good commit message looks like (2011)
#73The body of the commit message can be several paragraphs, and please do proper word-wrap and keep columns shorter than about 74 characters or so. That way "git log" will show things nicely even when it's indented. Software should help me, I shouldn't have to help it. Why doesn't git handle this formatting automatically? I shouldn't need to manually break lines for typographical (not paragraph) reasons.
m-X auto-fill-mode. You can add this to other modes automatically. I almost always have it on. Added to Emacs in 1977.
For instance, if you're editing a document and write a long sentence, that spreads over 3-4 lines. You then take a scalpel to it to make it more concise, so that it fits on a line or 2. Emacs won't reflow it automatically, you can manually get it to reflow (M-q by default), but its not the behaviors you expect from say a word processing program. Same exists if you insert new text.
TLDR: all auto-fill mode does is insert new lines when you reach the line length limit.
Re: What a good commit message looks like (2011)
#74>74 characters path dependency is hell of a drug.
The reason for this is that Git patches are meant to be exchanged over email. Historically email has a line limitation of 80 characters. You are supposed to use less than that to allow insertion of quoting characters in the first columns in replies.
Re: What a good commit message looks like (2011)
#75For example:
"I fixed the button issue on the homepage. Still, need to center the title."
would be better written as:
"fixes button issue on homepage"
Always think about what that commit does to the codebase. This is obviously for single-line commits. I suppose it would be okay to "dear diary" in the commit body. You can provide rationality or context in the commit body.
Re: What a good commit message looks like (2011)
#76Earlier quoted context omitted.
The reason for this is that Git patches are meant to be exchanged over email. Historically email has a line limitation of 80 characters. You are supposed to use less than that to allow insertion of quoting characters in the first columns in replies.
Your email client is supposed to fix this restriction in a completely transparent way. There are a few standards for that, and you can bet every client supports all of them.
Re: What a good commit message looks like (2011)
#77Here's what, Tim Pope, our favourite vim nerd has to say about this: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messa... (Same, but with more words.) A point of contention seems to be the choice of the imperative, at least for the subject line. While I'm really used to it, both when reading and writing, many people seem to strongly prefer past tense ("Fixed bug …" instead of "Fix bug …").
More importantly, the correct way is the way that is currently being used . If the project uses past tense, use it. If you want to change the convention, that's okay too, but everyone has to change. It's exactly the same issue as coding style. If you can look at code or commit messages and figure out who wrote it based purely on style/formatting, you're doing it wrong (or rather: the person using the inconsistent sty…
Re: What a good commit message looks like (2011)
#78Earlier quoted context omitted.
> I'm not sure why this matters much? Because wrapped code is generally nonsensical. > If the code doesn't fit on the screen you're viewing it on, then it's not going to be convenient to read Inconvenient is one thing, nonsensical is an other. > When would you have an indented line that shouldn't be wrap-indented? That's noted right after, in the parens: list items. This is not correct wrapping for a list item: * thi…
>Because wrapped code is generally nonsensical. Not really? It's probably slightly more awkward to read than scrolling, but then, the solution is to read code on an appropriately sized screen in the first place. And incidentally, truncated code definitely is nonsensical. >List items. They can be handled as you mention, but it's hardly the worst thing in the world if they're not. And if you really care about formattin…
Yes really.
> but then, the solution is to read code on an appropriately sized screen in the first place.
That's not a solution to anything.
> And incidentally, truncated code definitely is nonsensical.
Truncated code is visibly truncated, not nonsensical garbage right next to actual code.
> They can be handled as you mention
And the software knows what a list item is… how?
> it's hardly the worst thing in the world if they're not.
One more fantastic non-solution to listed problems, we're definitely going places.
> And if you really care about formatting this much, you should use a format that encodes it properly (e.g. Markdown) instead of producing the text equivalent of a PDF.
So you're saying git should embed a markdown renderer and text layout engine?
Re: What a good commit message looks like (2011)
#79Earlier quoted context omitted.
Except now you need everything to handle textual contexts because while I do want my nice paragraph of text to be wrapped, I don't want my code snippet to be wrapped at all, and I want my nested list to be correctly intended at wrapping.
I guess we want to use markdown in commit messages then.
Re: What a good commit message looks like (2011)
#80Earlier quoted context omitted.
m-X auto-fill-mode. You can add this to other modes automatically. I almost always have it on. Added to Emacs in 1977.
The point is that people shouldn't be littering their text with hard line breaks just to support software that can't do word-wrapping properly. That your editor can do this doesn't mean you should . It might make the text look a bit prettier in an 80 column terminal, but it makes it worse pretty much anywhere else.
It would be interesting to have a way to indicate a formatting style when composing a log message though; for instance, a way to indicate that a log contains Markdown code.