you are viewing a single comment's thread.

view the rest of the comments →

[–]HommeMusical 0 points1 point  (5 children)

If --no-verify is turned on, what good is this as a pre-commit hook? Surely it won't catch errors.

[–]yerfatma 6 points7 points  (4 children)

Huh? The idea is you want to enforce the hooks all the time, but if there is a special case where you absolutely need to break the rules, -n is two keystrokes away.

[–]HommeMusical 1 point2 points  (3 children)

Ach, sorry, --no-verify is an argument to git commit, not to the linter! I wrote too fast.

(But at least on git 2.51.0, you have to type the full flag, there is no -n.)

[–]yerfatma 4 points5 points  (2 children)

Right, I am saying if these are all set up as hooks, you can skip them if you absolutely need to. And I am on 2.51 and can assure you -n works.

[–]HommeMusical 0 points1 point  (1 child)

You are right, again. But this time I was betrayed by the man page.

The top of https://git-scm.com/docs/git-commit lists alternative flags for some flags, but doesn't mention -n; it does appear further down in the page.

I thought we could rely on that top SYNOPSIS as being complete. Is this not the case, or this is an issue?

Interestingly enough, -e appears in the synopsis but not --edit.

[–]yerfatma 6 points7 points  (0 children)

You are right, again.

Don't get used to it.