]> git.ipfire.org Git - thirdparty/git.git/commit
grep: remove overly paranoid BUG(...) code
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 26 Jul 2019 15:08:11 +0000 (17:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Jul 2019 20:56:40 +0000 (13:56 -0700)
commit04bef50c0175bba195443ea0edbf2991175cdd91
treea7a6f7e6fe5296e13605d0b7fed2937d448ff09c
parentb65abcafc7abd93ed634125bcec98b1460e75d2b
grep: remove overly paranoid BUG(...) code

Remove code that would trigger if pcre_config() or pcre2_config() was
so broken that "do we have JIT?" wouldn't return a boolean.

I added this code back in fbaceaac47 ("grep: add support for the PCRE
v1 JIT API", 2017-05-25) and then as noted in f002532784 ("grep: print
the pcre2_jit_on value", 2019-07-22) incorrectly copy/pasted some of
it in 94da9193a6 ("grep: add support for PCRE v2", 2017-06-01).

Let's just remove this code. Being this paranoid about the
pcre2?_config() function itself being broken is crossing the line into
unreasonable paranoia.

Reported-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c