git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (May 2017, #08; Mon, 29)

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 31, 2017, 18:59 UTC
Message-ID
<CACBZZX6YFKTLKxep2oW0_HrX+kNJ2PX5G4UCboB+4yosmLqr5g@mail.gmail.com>
In-Reply-To
<xmqq1sr889lb.fsf@gitster.mtv.corp.google.com>
On Mon, May 29, 2017 at 8:23 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> * ab/pcre-v2 (2017-05-26) 7 commits
>  - grep: add support for PCRE v2
>  - grep: un-break building with PCRE < 8.20
>  - grep: un-break building with PCRE < 8.32
>  - grep: add support for the PCRE v1 JIT API
>  - log: add -P as a synonym for --perl-regexp
>  - grep: skip pthreads overhead when using one thread
>  - grep: don't redundantly compile throwaway patterns under threading
>  (this branch uses ab/grep-preparatory-cleanup.)
>
>  Update "perl-compatible regular expression" support to enable JIT
>  and also allow linking with the newer PCRE v2 library.
>
>  Will merge to 'next'.

First a general question: When you say "will merge" in these E-Mails, that means "before the next what's cooking in ~7 days, right? I.e. if there's no issues in a given series does the pu->next->master cycle take 3wks?

Anyway, the PCRE v1 set of JIT patches break builds on PCRE compiled with --disable-jit, which is apparently Johannes's Windows configuration.

This on top fixes it:
diff --git a/grep.h b/grep.h
index 246f6695c1..6cb21a3544 100644
--- a/grep.h
+++ b/grep.h
@@ -3,7 +3,7 @@
 #include "color.h"
 #ifdef USE_LIBPCRE1
 #include <pcre.h>
-#ifdef PCRE_CONFIG_JIT
+#ifdef SLJIT_CONFIG_AUTO
 #if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
 #define GIT_PCRE1_USE_JIT
 #endif

But I'm waiting on the pcre-dev list to answer my "is this use of an
internal macro really the least insane way to check for this, because
there seems to be no other way?" question:
https://lists.exim.org/lurker/message/20170531.184405.9d7b128f.en.html

I'm also going to fix this up:

diff --git a/grep.c b/grep.c
index e4c1ead104..d0bf37858a 100644
--- a/grep.c
+++ b/grep.c
@@ -502,9 +502,7 @@ static void compile_pcre2_pattern(struct grep_pat
*p, const struct grep_opt *opt
        pcre2_config(PCRE2_CONFIG_JIT, &p->pcre2_jit_on);
        if (p->pcre2_jit_on == 1) {
                jitret = pcre2_jit_compile(p->pcre2_pattern,
PCRE2_JIT_COMPLETE);
-               if (!jitret)
-                       p->pcre2_jit_on = 1;
-               else
+               if (jitret)
                        die("Couldn't JIT the PCRE2 pattern '%s', got
'%d'\n", p->pattern, jitret);
                p->pcre2_jit_stack = pcre2_jit_stack_create(1, 1024 *
1024, NULL);
                if (!p->pcre2_jit_stack)


And a perf test in a commit message that makes no sense since I split
up the PCRE v1 patch.
Previous: Stefan BellerNext: Junio C Hamano
Message 8 of 9 in “What's cooking in git.git (May 2017, #08; Mon, 29)”
  1. Junio C HamanoMay 29, 2017
  2. Samuel LijinMay 29, 2017
  3. Junio C HamanoMay 30, 2017
  4. Stefan BellerMay 30, 2017
  5. Junio C HamanoMay 30, 2017
  6. Daniel Ferreira (theiostream)May 31, 2017
  7. Stefan BellerMay 31, 2017
  8. Ævar Arnfjörð BjarmasonMay 31, 2017
  9. Junio C HamanoJun 1, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.