Skip to content

feature, add ability to skip pre-commit/pre-push with --no-verify #586

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Mechanicalkeyboard
Copy link

No description provided.

@aorinevo
Copy link
Collaborator

aorinevo commented Apr 7, 2022

IMO, these parameters should not be passed through Shephard. Doing so would disable functionality that is typically used to, amongst other things, ensure certain standards are being met before committing or pushing changes which can help save on, amongst other things, resource consumption downstream (e.g., build pipelines, integ tests, etc...).

One workaround (See [1] for more details) to consider is to modify your local git config via

git config --global core.hooksPath /dev/null

You can revert back using

git config --global --unset core.hooksPath

Thoughts?

References

  1. https://stackoverflow.com/a/67527118

@Mechanicalkeyboard
Copy link
Author

@aorinevo I do like your suggestion of modifying the global hooks locally for certain cases.

I would like the option in this repo, because when you are working against many flavors of repositories, having the option of skipping pre-commit/pre-push hooks can save time in getting small isolated changes out to many repos where they may have hooks that trigger tests that require local setup.
My use case for this I end up running shepherd for hours, against many repos, modifying my global git config would interrupt my regular development life cycle. I'm basically pushing the heavy ci tests/ config require tests to our ci platform.

@aorinevo aorinevo self-requested a review April 20, 2022 15:10
@aorinevo aorinevo self-assigned this Apr 20, 2022
@AndrewCsontos
Copy link

Being able to add --noverify would be a really useful addition for my teams as well.

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.

3 participants