rycus86 / githooks

Githooks: per-repo and global Git hooks with version control
MIT License
381 stars 20 forks source link

Install only server hooks if bare #63

Closed gabyx closed 4 years ago

gabyx commented 4 years ago

Can we add another small feature, that we only install server hooks

If the repo is bare: We already have a variable detecting this :

IS_BARE=$(cd "${TARGET}" && git rev-parse --is-bare-repository 2>/dev/null)

in every install. So we select the appropriate hooks to loop over...

rycus86 commented 4 years ago

Yeah, that makes sense to me. Are these 3 the only ones that make sense? Any more hook types to include?

gabyx commented 4 years ago

No I have to investigate, its more

MANAGED_SERVER_HOOK_NAMES="
    pre-receive update post-receive post-update
    push-to-checkout pre-auto-gc
"
gabyx commented 4 years ago

https://stackoverflow.com/questions/58972724/what-all-git-hooks-can-be-called-in-a-bare-repository

rycus86 commented 4 years ago

Thanks for investigating!

rycus86 commented 4 years ago

This is already merged.