summaryrefslogtreecommitdiffstats
path: root/t/t4202-log.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-10-21 20:37:28 +0200
committerJunio C Hamano <gitster@pobox.com>2022-10-21 20:37:28 +0200
commit91d3d7e6e2be4aad74c5c602ed4988fbb1d82960 (patch)
tree9f1bf2a5b46367c109acce2a77260e8059c1acf6 /t/t4202-log.sh
parentMerge branch 'jc/symbolic-ref-no-recurse' (diff)
parentgrep.c: remove "extended" in favor of "pattern_expression", fix segfault (diff)
downloadgit-91d3d7e6e2be4aad74c5c602ed4988fbb1d82960.tar.xz
git-91d3d7e6e2be4aad74c5c602ed4988fbb1d82960.zip
Merge branch 'ab/grep-simplify-extended-expression'
Giving "--invert-grep" and "--all-match" without "--grep" to the "git log" command resulted in an attempt to access grep pattern expression structure that has not been allocated, which has been corrected. * ab/grep-simplify-extended-expression: grep.c: remove "extended" in favor of "pattern_expression", fix segfault
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-xt/t4202-log.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index cc15cb4ff6..2ce2b41174 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -249,6 +249,15 @@ test_expect_success 'log --grep' '
test_cmp expect actual
'
+for noop_opt in --invert-grep --all-match
+do
+ test_expect_success "log $noop_opt without --grep is a NOOP" '
+ git log >expect &&
+ git log $noop_opt >actual &&
+ test_cmp expect actual
+ '
+done
+
cat > expect << EOF
second
initial