spr icon indicating copy to clipboard operation
spr copied to clipboard

add --no-verify to git amend

Open b-chu opened this issue 2 years ago • 6 comments

There should be a way to skip pre-commit hooks

b-chu avatar Nov 09 '23 16:11 b-chu

Can you add more details please. In what cases would you want to skip commit hooks?

ejoffe avatar Nov 09 '23 18:11 ejoffe

When using git amend

b-chu avatar Nov 09 '23 18:11 b-chu

Are these custom pre-commit hooks that you have? or the commit msg hook that spr runs while updating the stack?

ejoffe avatar Nov 09 '23 18:11 ejoffe

git commit allows for --no-verify and spr uses git commit but doesn't allow for --no-verify https://git-scm.com/docs/git-commit

b-chu avatar Nov 09 '23 18:11 b-chu

git amend uses git commit --fixup + git rebase if you want to add --no-verify there it's possible. the code is in:

cmd/amend/main.go
spr/spr.go : AmendCommit function

Pull requests are welcome.

ejoffe avatar Nov 09 '23 18:11 ejoffe

Is this the same as or only quite similar to #293 ?

piefel avatar Dec 13 '23 08:12 piefel