4 ms·
1, 2.: This expense of time is about as much as it takes for the editor to open, and then to close it again. 4. Pre-commit hooks are an anti-pattern. The repo
by persnickety 3y ago
1, 2.: This expense of time is about as much as it takes for the editor to open, and then to close it again.
4. Pre-commit hooks are an anti-pattern. The repo creator has no business messing with my local, half-broken experiment/exploration commits. Do that on push if you must.
5. The dual: oh, you passed the wrong flags to commit and you remembered this after you started to write the commit message? Too bad, the mess is yours to fix now.
The one reason that completely convinces me is 3. It's not worth the pain to enter a multi-line commit on the command-line. -m is for one-liners.
- weinzierl 3y agoYou can use -m multiple times to create multiline commit messages.
- frizlab 3y agoPlus multi-line work (in zsh at least) when using quotes.
- account42 3y ago> 4. Pre-commit hooks are an anti-pattern. The repo creator has no business messing with my local, half-broken experiment/exploration commits. Do that on push if you must. Git hooks are not part of the version controlled repository so you can already set them to whatever you like (for anything executed local anyway, push hooks are up to the remote). You can also bypass them using --no-verify for cases where you consider that to be the right thing to do.
- persnickety 3y agoWeird, I never once set them myself but I've been subjected to them a couple times. Is my laptop developing gremlins?
- GrumpySloth 3y agoSomeone might have given you a command to run when setting up a repo. For example, it’s standard practice to download a hook which assigns a Change-Id to each commit when using Gerrit.
- SAI_Peregrinus 3y ago1 & 2 sound like the person doesn't know how to touch type. An adult who types as a major part of their job should easily be able to hit 70-80 WPM (5.8-6.7 characters per second) when copying random words, faster for actual typing. If ` -m "` and `"` (6 extra characters) is costing you more than a second, you should make an alias and also practice typing.
- techjamie 3y agoSeriously, what programmer is having a hard time finding " on their keyboard?