Code

grep: unset GREP_OPTIONS before spawning external grep
[git.git] / t / t7002-grep.sh
index ae5290ab43e8b51b32331768371e2a67d700064d..dd0da6c0bf45524b75de9dbaf67bbbef724fdf4e 100755 (executable)
@@ -213,6 +213,11 @@ test_expect_success 'grep -e A --and --not -e B' '
        test_cmp expected actual
 '
 
+test_expect_success 'grep should ignore GREP_OPTIONS' '
+       GREP_OPTIONS=-v git grep " mmap bar\$" >actual &&
+       test_cmp expected actual
+'
+
 test_expect_success 'grep -f, non-existent file' '
        test_must_fail git grep -f patterns
 '