elixirsc / git-pair

Automatically adds `Co-authored-by` mark when you're pairing
https://hex.pm/packages/git_pair
MIT License
8 stars 0 forks source link

Check if `.git/hooks/pre-commit` file exists #16

Open lcidral opened 4 years ago

lcidral commented 4 years ago

As reported by @amadeu01, there is a possibility of developer has .git/hooks/pre-commit, if so we can't overwrite it, returning an error when running git pair init.

We also, discussed to introduce a script to create a pre-commit file that would iterate over .git/hooks/pre-commits directory then call it script under it (including our git-pair _append-coauthors call). But I think that we should create a separate issue for this one. WDYT?

amadeu01 commented 4 years ago

Handling more hooks per trigger seems to be another task outside the scope of the project. I think if some user already has a hook for pre-commit event trigger, we should let them call the CLI without the hooker.

amadeu01 commented 4 years ago

(We can make another tool for handling more hooks scripts per events )

wevtimoteo commented 4 years ago

I think we can, initially, consider a separate task for it.