ddddavidmartin / Pre-commit-hooks

A set of useful (and documented!) git pre-commit hooks.
BSD 2-Clause "Simplified" License
101 stars 30 forks source link

Improve support of directory names with spaces and POSIX compatibility #3

Closed emdroid closed 10 years ago

ddddavidmartin commented 10 years ago

Thank you very much for your input! Robustness against whitespaces has been lacking for quite a while in those scripts and I did not get a chance yet to have a look into it.

I will double-check your changes on my machine and merge your request then.

emdroid commented 10 years ago

Sorry, I pressed a wrong button and closed the pull request by accident :)

emdroid commented 10 years ago

I did some tests on my Linux machine, and I found some additional issues, created 2 new commits in the pull request to address those:

emdroid commented 10 years ago

I did some more extensive testing on Linux, with an actual testing repository containing spaces and dash at the beginning, so I updated the pull request with the new commits which are working for me on the Linux box.

I also took the time to make the scripts POSIX compatible, i.e. instead of changing the shell line to always use /bin/bash, the scripts should now work with any POSIX compatible /bin/sh (tested with /bin/dash and /bin/ash on Ubuntu).

ddddavidmartin commented 10 years ago

Awesome, I really appreciate your efforts! I had a look over the changes and gave it a quick go on my Mac and it all seems to work fine (including whitespaces and everything). Big thumbs up for the POSIX compatibility as well!

I will close and merge this then. Thanks very much!