Skip to content

Add no-verify commit command #1375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 13, 2023
Merged

Add no-verify commit command #1375

merged 3 commits into from
Jan 13, 2023

Conversation

dam5h
Copy link
Contributor

@dam5h dam5h commented Oct 4, 2022

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
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

@dam5h dam5h changed the title trying to commit no-verify Add no-verify commit command Oct 4, 2022
@extrawurst
Copy link
Collaborator

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.

@dam5h
Copy link
Contributor Author

dam5h commented Oct 15, 2022

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

@dam5h dam5h force-pushed the no-verify branch 2 times, most recently from e01bff2 to 06f55c0 Compare October 25, 2022 02:05
@dam5h
Copy link
Contributor Author

dam5h commented Oct 25, 2022

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

@dam5h dam5h force-pushed the no-verify branch 2 times, most recently from c4515b1 to 3938f27 Compare December 3, 2022 12:44
@extrawurst extrawurst marked this pull request as ready for review January 13, 2023 13:05
@extrawurst
Copy link
Collaborator

lgtm! Thanks you. will create the relevant changelog

@extrawurst extrawurst merged commit 5ca712f into gitui-org:master Jan 13, 2023
extrawurst pushed a commit that referenced this pull request Jan 13, 2023
* add no-verify option on commit action
* make verify a bool flag on commit component
@dam5h
Copy link
Contributor Author

dam5h commented Jan 13, 2023

Thanks @extrawurst , I am really enjoying daily driving gitui!

@dam5h dam5h deleted the no-verify branch January 13, 2023 18:01
IndianBoy42 pushed a commit to IndianBoy42/gitui that referenced this pull request Jun 4, 2024
* add no-verify option on commit action
* make verify a bool flag on commit component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No verify option on commits
2 participants