We need to consider the following
When you git hooks shared update in a local repo and it downloads the repo into ~/.githooks/shared/hookrepo
During any git pull which happens in this shared hook checkout folder, since it contains an .githooks folder and .git/hooks is setup with the githook manager:
any post-merge hook will be executed since it reacts to git pull.
To break this recursion, we should skip executing any hook.
Solution:
stop in the base-template.sh when the $(pwd) is in a shared hook checkout [hack]
or git hooks uninstall after any checkout of these shared hooks [stupid overhead]
or git clone --template="" $url ~/.githooks/shared/hookrepo and afterwards if LFS is available
git lfs install --local [best ?]
We need to consider the following When you
git hooks shared update
in a local repo and it downloads the repo into~/.githooks/shared/hookrepo
During anygit pull
which happens in this shared hook checkout folder, since it contains an.githooks
folder and.git/hooks
is setup with the githook manager: anypost-merge
hook will be executed since it reacts togit pull
.To break this recursion, we should skip executing any hook. Solution:
base-template.sh
when the$(pwd)
is in a shared hook checkout [hack]git hooks uninstall
after any checkout of these shared hooks [stupid overhead]git clone --template="" $url ~/.githooks/shared/hookrepo
and afterwards if LFS is availablegit lfs install --local
[best ?]