summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-08-10 11:55:29 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-08-10 11:55:29 -0700
commit7b163e918772736b69252053913ba5ccc24adb4d (patch)
tree0352673d01121d6578ffd25b2a15f7b438b2d707 /t
parentMerge branch 'jk/diff-do-not-reuse-wtf-needs-cleaning' into maint (diff)
parentgrep: further simplify setting the pattern type (diff)
downloadtgif-7b163e918772736b69252053913ba5ccc24adb4d.tar.xz
Merge branch 'jc/grep-commandline-vs-configuration' into maint
"git -c grep.patternType=extended log --basic-regexp" misbehaved because the internal API to access the grep machinery was not designed well. * jc/grep-commandline-vs-configuration: grep: further simplify setting the pattern type
Diffstat (limited to 't')
-rwxr-xr-xt/t4202-log.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 128ba93537..0b53e56694 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -255,6 +255,20 @@ test_expect_success 'log -F -E --grep=<ere> uses ere' '
test_cmp expect actual
'
+test_expect_success 'log with grep.patternType configuration' '
+ >expect &&
+ git -c grep.patterntype=fixed \
+ log -1 --pretty=tformat:%s --grep=s.c.nd >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log with grep.patternType configuration and command line' '
+ echo second >expect &&
+ git -c grep.patterntype=fixed \
+ log -1 --pretty=tformat:%s --basic-regexp --grep=s.c.nd >actual &&
+ test_cmp expect actual
+'
+
cat > expect <<EOF
* Second
* sixth