shepherd icon indicating copy to clipboard operation
shepherd copied to clipboard

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

Open Mechanicalkeyboard opened this issue 2 years ago • 3 comments

Mechanicalkeyboard avatar Apr 07 '22 14:04 Mechanicalkeyboard

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

aorinevo avatar Apr 07 '22 14:04 aorinevo

@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.

Mechanicalkeyboard avatar Apr 20 '22 13:04 Mechanicalkeyboard

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

AndrewCsontos avatar Dec 01 '22 15:12 AndrewCsontos