gabyx / Githooks

🦎 Githooks: per-repo and shared Git hooks with version control and auto update. [✩Star] if you're using it!
MIT License
102 stars 5 forks source link

feat: customizable githooks directory per repository #112

Closed LoeschMaximilian closed 11 months ago

LoeschMaximilian commented 1 year ago

At work we have a convention to use .git-hooks as the directory-name for checked in git hooks. This feature would ease our transition to Githooks away from other solutions.

I saw that .githooks is hard-coded, but i lack the go skills to change that myself.

gabyx commented 1 year ago

Its a good point, maybe we could customize this somehow. But I d like not to go over the git config as this seams a bit overkill, maybe over an environment variable?

You could however (beware of Windows crap and symlinks) introduce a simple relative symlink .githooks -> .git-hooks and commit it. Git will work with that fine. On Linux/macOS on Windows too if you enable creation of symlinks

gabyx commented 1 year ago

There is a PR which would do this change: https://github.com/gabyx/Githooks/pull/117, it needs however a another test.

I think the symlink is a better option for now I think and would solve your issue.

LoeschMaximilian commented 11 months ago

Thanks, keep up the good work.

LoeschMaximilian commented 11 months ago

Thank you very much :)