NitorCreations / license-maintainer

Maintains license preamble in source files etc in your project
Other
15 stars 11 forks source link

Install ~/.githooks/pre-commit as pre-commit hook instead for better migration paths #4

Open xkr47 opened 9 years ago

xkr47 commented 9 years ago

If somebody first takes license-maintainer into use and installs the pre-commit hook using the provided .githooks/license-maintainer/install, then it is error-prone for that project to later introduce a project-specific pre-commit hook in e.g. .githooks/pre-commit because old users might not notice they need to re-install the pre-commit hook to run from the new location instead.

Therefore it would be better for the provided install script to create a .githooks/pre-commit script which calls .githooks/license-maintainer/pre-commit and install the former as pre-commit hook instead. That can then later be easily customized to meet further project needs without needing re-installation on a per-repository basis.

lalloni commented 7 years ago

Great suggestion!