Re:Using Git commit message templates to write better commit...
by kevincox on Thursday January 13, 2022 @06:14AM
(#29919420)
I prefer scissors.
https://git-scm.com/docs/git-commit#Documentation/git-commit...
This way you can use basically anything at the start of the line (as long as the whole line isn't the scissors)
Re:Using Git commit message templates to write better commit...
by chrismorgan on Thursday January 13, 2022 @09:15AM
(#29920936)
The really funny thing here is that I’m used to seeing the scissors line because I set commit.verbose, but I’d been puzzling from time to time over what that >8 in the middle of the line was, and just a few hours ago I finally realised (prompted no doubt by dwelling on core.commentchar) that it was ASCII art scissors. >8 feels weird, even though it’s the direction a right-hander would cut paper; 8< feels more natural for some reason (maybe because LTR language?).
You’re quite right, scissors is better. TIL! I have now set my commit.cleanup to scissors. I could even drop core.commentchar and my gitcommit and gitrebase syntax and after/ftplugin/ patches.
Also your text editor may be able to help with things like 50 and 72. Vim’s gitcommit syntax and ftplugin files, for example, highlight the first 50 characters of the first line differently and set textwidth to 72, so that if 'formatoptions' includes t it’ll auto-wrap as you type, and you can use the likes of gqap to rewrap a paragraph. (If you change commentchar, you’ll want to copy and change those files to match. Hmm, should contribute a patch to make it configurable with a variable. Probably won’t get to it, though.)