summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-06-01 13:01:41 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-06-01 13:01:41 -0700
commit2147cb2762c67d0ec2101ab13a4c1b0ef8cab599 (patch)
tree7dccda03b60264e9922edc9bbcad3d4942d77f10 /t
parentMerge branch 'jk/ident-split-fix' into maint (diff)
parentgrep: stop leaking line strings with -f (diff)
downloadtgif-2147cb2762c67d0ec2101ab13a4c1b0ef8cab599.tar.xz
Merge branch 'rs/maint-grep-F' into maint
"git grep -e '$pattern'", unlike the case where the patterns are read from a file, did not treat individual lines in the given pattern argument as separate regular expressions as it should. By René Scharfe * rs/maint-grep-F: grep: stop leaking line strings with -f grep: support newline separated pattern list grep: factor out do_append_grep_pat() grep: factor out create_grep_pat()
Diffstat (limited to 't')
-rwxr-xr-xt/t7810-grep.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index d9ad633310..24e9b1974d 100755
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
@@ -351,6 +351,11 @@ test_expect_success 'grep -f, multiple patterns' '
test_cmp expected actual
'
+test_expect_success 'grep, multiple patterns' '
+ git grep "$(cat patterns)" >actual &&
+ test_cmp expected actual
+'
+
cat >expected <<EOF
file:foo mmap bar
file:foo_mmap bar