Open dwightmulcahy opened 5 years ago
I have something cobbled together for this... need refactoring and some cleanup before I PR it.
I'm not really liking that this overwrites any existing git-hook without mercy.
Agree, obliterating what's already there isn't very nice.
So this is what I'm envisioning, if an executable git-hook exists in the user's directory a "chain" would be added so that the newly installed script would be executed first and the user's chained to execute second.
It looks like the chaining piece (at least what you linked in SO) is pretty platform-dependent as it relies on symlinks. We already have some Windows users (see #2) is there a way we can keep this compatible with both?
...platform-dependent ... ...is there a way we can keep this compatible with both?
actually keeping it simple and just making the git-hook (like pre-commit
) the hook-chain
would do away with any symlinking.
One of the main issues I can think of now is that there would have to be some way to avoid continuing adding onto the "chain". Maybe a manifest of sha1/md5's?
I'm not really liking that this overwrites any existing git-hook without mercy.
See this for discussion... https://stackoverflow.com/questions/8730514/chaining-git-hooks
So this is what I'm envisioning, if an executable git-hook exists in the user's directory a "chain" would be added so that the newly installed script would be executed first and the user's chained to execute second.