li6in9muyou / git--dotfiles

0 stars 0 forks source link

deploy my hooks into every git repo during `git init` and do not change `git config hooksPath` #5

Open li6in9muyou opened 2 days ago

li6in9muyou commented 2 days ago

see https://github.com/typicode/husky/issues/391#issuecomment-437163306

li6in9muyou commented 1 day ago

impl'ed in 1592f36

li6in9muyou commented 19 hours ago

this does not work as intended and has many short-comings

  1. husky uses git config core.hooksPath so my hooks in .git/hooks are completely ignored
  2. copying my hooks to .husky will override husky's pre-commit thus in effect disabling husky
  3. very hard to keep .git/hooks in all repos in sync
  4. very hard to keep config files in all repos in sync and they being not tracked by git makes it worse

proposed solution: my hooks will be deployed with git config core.hooksPath and they will run ./.husky if any