summaryrefslogtreecommitdiff
path: root/tools/pre-commit
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-07-08 15:32:39 -0400
committerBill Meier <wmeier@newsguy.com>2014-07-08 20:00:52 +0000
commitb66f614e5d5fee0aad1eb025c228fcbf7f2aae7e (patch)
treefffd207983fdf8216f48f8c8334cd5418062c365 /tools/pre-commit
parent17872b57e96ab056c0585591b8940d3206711c8f (diff)
downloadwireshark-b66f614e5d5fee0aad1eb025c228fcbf7f2aae7e.tar.gz
pre-commit: Add 'unset GREP_OPTIONS' (similar to Gerrit commit-msg)
msysgit grep is fairly old and doesn't recognize certain grep options, e.g., '--color=auto'. I imagine there may possibly be other grep option issues on various platforms. (I also note that the various git scripts in libexec/git-core clear out GREP_OPTIONS before calling grep). Change-Id: I67bc148a77cfc0167064e61e8c47a5f091704eac Reviewed-on: https://code.wireshark.org/review/2945 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'tools/pre-commit')
-rwxr-xr-xtools/pre-commit2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/pre-commit b/tools/pre-commit
index 153f229b03..b336d34880 100755
--- a/tools/pre-commit
+++ b/tools/pre-commit
@@ -8,6 +8,8 @@
# http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes
#
+unset GREP_OPTIONS
+
if [ -z $GIT_DIR ]; then GIT_DIR=".git"; fi
# Check for newer versions of the pre-commit script