kazazor / git-pre-commit

A pre-commit hook that ignores all the unstagged changes while performing the pre-commit command you wrote (Using Shell, Gulp, Grunt etc..)
https://www.npmjs.com/package/git-pre-commit
MIT License
18 stars 5 forks source link

When there is no git repository, exit with no error code (0 instead of 1) #23

Closed kazazor closed 8 years ago

kazazor commented 8 years ago

Where the use case for that?

Usually when using docker image you're coping the package.json file and then npm install (for docker caching).

Since we do not copy yet the entire project, the .git folder is not there. And so we're getting an error saying this is not a git repository.