abhinav / git-spice

Manage stacked Git branches
https://abhinav.github.io/git-spice/
GNU General Public License v3.0
187 stars 7 forks source link

Add `--no-verify` to commit, push, etc #380

Open ElPicador opened 1 week ago

ElPicador commented 1 week ago

I'm using a lot of pre-commit/push hooks. And sometimes skipping them with a --no-verify can be useful.

I'm willing to implement this feature. Is it something you would be open to accept as a contribution? Any tips/comments on how to implement it?

abhinav commented 1 week ago

Hello! Yes, a contribution for this would be welcome.

In terms of implementation: The flag will be added to branchCreateCmd and the three commit subcommands amend, create, and split. All of these commands call git.Repository.Commit, which accepts a git.CommitRequest. We'll need a new field on that struct for this option, and in Repository.Commit we can convert it into a flag passed to Git.

Other minor notes about contributing: