icefox/git-hooks — pull request #42 by mparker17 (2014-08-15 19:56:43+00:00)
Title: Reset GREP_OPTIONS environment variable before calling grep.

You can pass your own preferred options to all `grep` calls by adding them to an environment variable named `GREP_OPTIONS`. But, some options, like `--line-number`, change the output of grep, causing git-hooks to break.

To fix this, we simply reset the `GREP_OPTIONS` variable in the scope of the functions that use `grep`.

To test the behaviour, compare the output of `export GREP_OPTIONS="--line-number"; git hooks` before and after this patch.