Skip to content

reoganize code in install_hooks for easier maintenance#47

Open
samirnoman wants to merge 1 commit intodanny0838:mainfrom
samirnoman:refactor_install_hooks
Open

reoganize code in install_hooks for easier maintenance#47
samirnoman wants to merge 1 commit intodanny0838:mainfrom
samirnoman:refactor_install_hooks

Conversation

@samirnoman
Copy link
Contributor

This is a minor edit to the function install_hooks which implement these changes (no new functionality is added):

  • put all hooks in a hash variable %hooks so they can be reviewed/modified together

  • write hooks in a loop over the %hooks hash

  • print a message if hooks are overwritten

  • do not install hooks if dry-run is set

  • TODO: it may be relatively easy to add a safety option to backup hooks if they exist (--backup)

* put all hooks in a hash variable %hooks so they can be reviewed/modified together

* write hooks in a loop over the %hooks hash

* print a message if hooks are overwritten

* do not install hooks if dry-run is set

* TODO: it may be relatively easy to add a safety option to backup hooks if they exist (--backup)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments