rycus86 / githooks

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

Update option to always overwrite the global templates. #54

Closed gabyx closed 4 years ago

gabyx commented 4 years ago

Could we have a githooks option githooks.autoupdate.alwaysGlobal such that the global templates get always updated. To make sure, when an update on the system happens, not only the local repo hook scripts get updated but also the global template folder. That would drastically reduce the risk of template folder and local repo hooks are out of sync.

Shouldn't that be the default behavior. That would be great.

I dont want to use the core.hooksPath because its to global for the system.

 # Install the hook templates if needed
    if ! is_single_repo_install; then
        setup_hook_templates || return 1
        echo # For visual separation
    fi
gabyx commented 4 years ago

Scenario (up to now):

Scenario to have:

gabyx commented 4 years ago

Need a better explanation. Sorry.