4 ms·
>should not be wrapped (code) I'm not sure why this matters much? If the code doesn't fit on the screen you're viewing it on, then it's not going to be conven
by aninhumer 10y ago
>should not be wrapped (code)
I'm not sure why this matters much?
If the code doesn't fit on the screen you're viewing it on, then it's not going to be convenient to read regardless of whether you wrap it or have a horizontal scroll.
>should be wrap-indented
When would you have an indented line that shouldn't be wrap-indented?
- masklinn 10y ago> 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: * this is a list item this is correct wrapping for a list item: * this is a list item If the display software does not do that (and I'm reasonably certain most would not) I'd much rather properly hard-wrap my text before committing it, that way I know that it will end up correctly wrapped and actually readable.
- aninhumer 10y ago>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 formatting this much, you should use a format that encodes it properly (e.g. Markdown) instead of producing the text equivalent of a PDF.
- masklinn 10y ago> Not really? 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?
- aninhumer 10y ago>That's not a solution to anything. I'm not sure what scenario you're imagining where you absolutely have to read code in commit messages on an unreasonably narrow screen, and you can't wait until you have an appropriate machine. But if a scenario occurred where that were important, I'm sure you'd manage to read some wrapped code, it's not that hard. >Truncated code is visibly truncated Unless it's not, because there's ` + someExtraStuff` just off the end. >So you're saying git should embed a markdown renderer and text layout engine? If you really want pristinely formatted commit messages that badly then yes.
- masklinn 10y ago> If you really want pristinely formatted commit messages that badly then yes. Mate, I already have pristinely formatted commit messages, because I format them as I desire. You are the person telling me I shouldn't be formatting my messages and a nebulous "software" ought do that, the burden's on you to give them the tools which yield the same pristinely formatted output I already achieve without a formatted input.
- aninhumer 10y agoYou have pristinely formatted commit messages when viewed in ~80 column monospace, but poorly formatted commit messages anywhere else.
- groovy2shoes 10y agoThe word "generally" here has a precise meaning when used in a formal (mathematical) sense. Using that meaning, the phrase "wrapped code is generally nonsensical" could be read as "there exists some code that is nonsensical when line-wrapped" or "the amount of code that is nonsensical when line-wrapped is non-zero". More precisely, it means that, in general, you cannot rely on any ol' code to remain sensical after wrapping has taken place. Hopefully, it's obvious that this is true.