Add no-verify commit command
This Pull Request fixes/closes #1374.
It changes the following:
- Adds a "Commit no-verify" option to the commit workflow.
I think there is likely a cleaner way that just adds a "no-verify" or "no-hooks" option, but maybe this works fine. It seems the the amend workflow could probably still use this.
I followed the checklist:
- [ ] I added unittests
- [x] I ran
make checkwithout errors - [x] I tested the overall application
- [ ] I added an appropriate item to the changelog
yeah I think I would prefer an option that we can toggle with the new key and that resets back to the verify default after a commit.
I have been using this and it does work fine with the amend workflow. I can look into adding it as an option, this makes for less "action" items on the menu bar, but does add a keystroke in the workflow. You have to set the option and then hit commit. As it is now, you can just hit ctrl-f to quickly force a commit. Maybe one use case for --no-verify is that you are is a rush anyway so I've found not having the extra step of a toggle (like in magit) to be kinda nice.
That said adding options to this menu could well be extended into other flags as well, so that could be a good thing.
I'd have to dig through the code a bit more to see how you are handing options, but happy to do so. Thanks for taking a look here.
Cheers! Dave
Howdy @extrawurst , I've updated this to be a flag on the CommitComponent struct, which can be toggled on or off via Ctrl-f. When verify is true (the default), it shows Disable hooks [^f] in the menu, once toggled the menu shows Enable hooks [^f]
Let me know if this is what you had in mind, re: "toggle with new key". I'll be taking it for a spin for the rest of the week.
Cheers, Dave
lgtm! Thanks you. will create the relevant changelog
Thanks @extrawurst , I am really enjoying daily driving gitui!