-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use git’s core.hooksPath capability to store hook scripts in the repository #61
Comments
Wow I didn't know that ! One question that come in my mind as I read this:
|
They would be ignored. The config setting basically says "look up hooks scripts in this folder" and nowhere else. |
Okay then this should probably an option for the
|
That sounds good indeed! That way |
Scratch that, mookme/packages/mookme/src/utils/git.ts Line 89 in 3e20833
|
DescriptionWe want to exploit the git option Use case 1: I am the first on my project to setup Mookme
Use case 2: I cloned a repo with mookme in it, and the option is set in
|
That remains a piece of work, but I'll leave it as available for newcomers because it does not impact crucial parts of the code and is relatively well-scoped. No need to do all of this in one single merge request, it is possible to move on with this step by step ! |
mookme init
writes the actual git hook scripts into.git/hooks
. Since 2.9, git itself supports changing the path in which git looks up the hooks scripts to some place in the repository. E.g. mookme could place it’s scripts under.hooks/scripts
and rungit config core.hooksPath .hooks/scripts
to make git read from these scripts.Storing the scripts directly in the repository allows modifying them, e.g. for integration with git-lfs hooks.
The text was updated successfully, but these errors were encountered: