Open gabyx opened 4 years ago
I'm OK with this change if it's behind an opt-in flag you manually have to enable on your installation.
i think we need to make sure that we dont accidentally execute githooks wrapper scripts again ;) if they are still in place accidentally, hmm but thats cumbersome to detect :)
Von meinem iPhone gesendet
Am 05.09.2020 um 02:04 schrieb Viktor Adam notifications@github.com:
I'm OK with this change if it's behind an opt-in flag you manually have to enable on your installation.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I have the following szenario I was thinking about.
When using Gitea, it will create repos for you somewhere on the server. Assume there is githooks installed. Because Gitea is not aware of githooks, it just forcefully overwrites into the bare
repo.git/hooks
directory some hooks it need to run. Thats kind of bad if githooks init.templateDir is in place...I actually want for all repos on the server to be using githooks. Thats why I installed githooks with
core.hooksPath
core.hooksPath
is now running for every repo, and also executing the "execute_old_hook_if_available" from GiteaGitea can now create new repos and every thing is fine since the local
repo.git/hooks
gets ignored anyway and these hooks are now executed since I copied them in the first place.I was wondering: Could we make the base-template such that when
githooks.useCoreHooksPath
is true we can additionally (maybe as a opt-in) also execute the hooks inGIT_DIR/hooks
. In that way I dont need to clumsily copy the Gitea hooks to thecore.hooksPath
( I even dont know if there are not somewhen more hooks or different ones and so forth...).So the procedure whould be:
What do you think? I am really not sure if this is really good to support... hm... It just solves my problem but its another setup which makes things to understand a bit harder...