My inactivity in git recently

2019-10-16 Thread Ævar Arnfjörð Bjarmason
Hi, thought I'd send this to git@ as a public FYI. Some of you were concerned about my inactivity recently, rest assured I'm fine, just been busy with other things. Hoping to get back into it sooner than later, sorry about not replying to things I've been CC'd on.

Re: [PATCH v3 2/5] repo-settings: add feature.manyCommits setting

2019-07-31 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 30 2019, Derrick Stolee via GitGitGadget wrote: > +feature.*:: > + The config settings that start with `feature.` modify the defaults of > + a group of other config settings. These groups are created by the Git > + developer community as recommended defaults and are subje

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-31 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 31 2019, Johannes Schindelin wrote: > Hi, > > On Mon, 29 Jul 2019, Carlo Marcelo Arenas Belón wrote: > >> $ git grep 'foo bar' >> fatal: Couldn't JIT the PCRE2 pattern 'foo bar', got '-48' > > My immediate reaction to this error message was: That's not helpful. > What is `-48` su

Re: [PATCH 0/4] gc docs: modernize and fix the documentation

2019-07-31 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 31 2019, Jeff King wrote: > On Fri, May 10, 2019 at 01:20:55AM +0200, Ævar Arnfjörð Bjarmason wrote: > >> > Michael Haggerty and I have (off-list) discussed variations on that, but >> > it opens up a lot of new issues. Moving something into quarantine isn&

Re: [PATCH] send-email: Ask if a patch should be sent twice

2019-07-30 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 30 2019, Dmitry Safonov wrote: > I was almost certain that git won't let me send the same patch twice, > but today I've managed to double-send a directory by a mistake: > git send-email --to linux-ker...@vger.kernel.org /tmp/timens/ > --cc 'Dmitry Safonov <0x7f454...@

Re: [PATCH] Documentation/git-fsck.txt: include fsck.* config variables

2019-07-29 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 29 2019, SZEDER Gábor wrote: > The 'fsck.skipList' and 'fsck.' config variables might be > easier to discover when they are documented in 'git fsck's man page. > > Signed-off-by: SZEDER Gábor > --- > Documentation/git-fsck.txt | 5 + > 1 file changed, 5 insertions(+) > > diff -

Re: Settings for minimizing repacking (and keeping 'rsync' happy)

2019-07-29 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 29 2019, Jeff King wrote: > On Sun, Jul 28, 2019 at 01:41:34AM +0200, ardi wrote: > >> Some of my Git repositories have mirrors, maintained with 'rsync'. I >> want to have some level of repacking, so that the repositories are >> efficient, but I also want it to minimize it, so that '

Re: Warnings in gc.log can prevent gc --auto from running

2019-07-29 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 29 2019, Jeff King wrote: > On Thu, Jul 25, 2019 at 07:18:57PM -0700, Gregory Szorc wrote: > >> I think I've found some undesirable behavior with regards to the >> behavior of `git gc --auto`. The tl;dr is that a warning message written >> to gc.log can result in `git gc --auto` effe

Re: [RFC PATCH] grep: allow for run time disabling of JIT in PCRE

2019-07-29 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 29 2019, Carlo Arenas wrote: > On Mon, Jul 29, 2019 at 1:55 AM Ævar Arnfjörð Bjarmason > wrote: >> >> On Mon, Jul 29 2019, Carlo Marcelo Arenas Belón wrote: >> >> > PCRE1 allowed for a compile time flag to disable JIT, but PCRE2 never >> >

Re: [PATCH v2 0/8] grep: PCRE JIT fixes + ab/no-kwset fix

2019-07-29 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 26 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> 1-3 here are a re-roll on "next". I figured that was easier for >> everyone with the state of the in-flight patches, it certainly was for >> me. Sorry Junio if this creates a

Re: [PATCH v2 4/8] grep: consistently use "p->fixed" in compile_regexp()

2019-07-29 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 29 2019, Ævar Arnfjörð Bjarmason wrote: > On Mon, Jul 29 2019, Carlo Arenas wrote: > >> On Fri, Jul 26, 2019 at 8:09 AM Ævar Arnfjörð Bjarmason >> wrote: >>> >>> It's less confusing to use that variable consistently that switch back >&g

Re: [PATCH v2 4/8] grep: consistently use "p->fixed" in compile_regexp()

2019-07-29 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 29 2019, Carlo Arenas wrote: > On Fri, Jul 26, 2019 at 8:09 AM Ævar Arnfjörð Bjarmason > wrote: >> >> It's less confusing to use that variable consistently that switch back >> & forth between the two. >> >> Signed-off-by: Ævar Arnfjörð B

Re: [RFC PATCH] grep: allow for run time disabling of JIT in PCRE

2019-07-29 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 29 2019, Carlo Marcelo Arenas Belón wrote: > PCRE1 allowed for a compile time flag to disable JIT, but PCRE2 never > had one, forcing the use of JIT if -P was requested. What's that PCRE1 compile-time flag? > After ed0479ce3d (Merge branch 'ab/no-kwset' into next, 2019-07-15) > the

Re: [PATCH 3/3] grep: plug leak of pcre chartables in PCRE2

2019-07-27 Thread Ævar Arnfjörð Bjarmason
On Sat, Jul 27 2019, Carlo Marcelo Arenas Belón wrote: > Just as it is done with PCRE1, make sure that the allocated chartables > get free at cleanup time. > > This assumes no global context is used (NULL passed when created the > tables), but will likely be updated in tandem if that ever change

Re: [PATCH 1/3] grep: make pcre1_tables version agnostic

2019-07-27 Thread Ævar Arnfjörð Bjarmason
On Sat, Jul 27 2019, Carlo Marcelo Arenas Belón wrote: > 6d4b5747f0 ("grep: change internal *pcre* variable & function names > to be *pcre1*", 2017-05-25), renamed most variables to be PCRE1 > specific to give space to similarly named variables for PCRE2, but > in this case the change wasn't nee

Re: [PATCH v2 8/8] grep: optimistically use PCRE2_MATCH_INVALID_UTF

2019-07-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 26 2019, Ævar Arnfjörð Bjarmason wrote: > On Fri, Jul 26 2019, Junio C Hamano wrote: > >> Ævar Arnfjörð Bjarmason writes: >> >>> diff --git a/Makefile b/Makefile >>> index bd246f2989..dd38d5e527 100644 >>> --- a/Mak

Re: [PATCH v2 6/8] grep: stess test PCRE v2 on invalid UTF-8 data

2019-07-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 26 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> diff --git a/grep.c b/grep.c >> index 6d60e2e557..5bc0f4f32a 100644 >> --- a/grep.c >> +++ b/grep.c >> @@ -615,6 +615,16 @@ static void compile_regexp(struct g

Re: [PATCH v2 8/8] grep: optimistically use PCRE2_MATCH_INVALID_UTF

2019-07-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 26 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> diff --git a/Makefile b/Makefile >> index bd246f2989..dd38d5e527 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -726,6 +726,7 @@ TEST_BUILTINS_OBJS += test-oidmap.o >>

Re: [PATCH] grep: skip UTF8 checks explicitally

2019-07-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 26 2019, Carlo Arenas wrote: > On Fri, Jul 26, 2019 at 8:15 AM Ævar Arnfjörð Bjarmason > wrote: >> I'm not sure what a real fix for that is. Part of it is probably 8/8 in >> the series I mention below, but more generally we'd need to be more >&g

Re: [PATCH] grep: skip UTF8 checks explicitally

2019-07-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 26 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> FWIW what I meant was not that we'd run around and iconv() things, it >> wouldn't make much sense to e.g. iconv() some PNG data to be "UTF-8 >> valid", which presumab

Re: [PATCH] grep: skip UTF8 checks explicitally

2019-07-26 Thread Ævar Arnfjörð Bjarmason
On Thu, Jul 25 2019, Johannes Schindelin wrote: > Hi Junio, > > On Thu, 25 Jul 2019, Junio C Hamano wrote: > >> Johannes Schindelin writes: >> >> >> OK, in short, barfing and stopping is a problem, but that flag is >> >> not the right knob to tweak. And the right knob ... >> >> >> >> > 1) We'

[PATCH v2 8/8] grep: optimistically use PCRE2_MATCH_INVALID_UTF

2019-07-26 Thread Ævar Arnfjörð Bjarmason
the non-icase bug out of the way this is obscure enough to tell people "upgrade your PCRE v2 too!'. It'll likely be released by the time we release the git version this commit is part of. We can't just use PCRE2_NO_UTF_CHECK instead for the reasons discussed in [1]. 1.

[PATCH v2 1/8] grep: remove overly paranoid BUG(...) code

2019-07-26 Thread Ævar Arnfjörð Bjarmason
le paranoia. Reported-by: Beat Bolli Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/grep.c b/grep.c index 0937c5bfff..95af88cb74 100644 --- a/grep.c +++ b/grep.c @@ -394,14 +394,11 @@ static void compile_pcre1_rege

[PATCH v2 6/8] grep: stess test PCRE v2 on invalid UTF-8 data

2019-07-26 Thread Ævar Arnfjörð Bjarmason
behavior of PCRE v2 that technically could change, but I think the test coverage is worth dipping our toe into some somewhat undefined behavior. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 10 ++ t/t7812-grep-icase-non-ascii.sh | 28

[PATCH v2 0/8] grep: PCRE JIT fixes + ab/no-kwset fix

2019-07-26 Thread Ævar Arnfjörð Bjarmason
checks explicitally" in https://public-inbox.org/git/20190721183115.14985-1-care...@gmail.com/ As noted the bug isn't fully fixed until 8/8, and that patch relies on unreleased PCRE v2 code. I'm hoping that with 7/8 we're in a good enough state to limp forward as noted in the ratio

[PATCH v2 4/8] grep: consistently use "p->fixed" in compile_regexp()

2019-07-26 Thread Ævar Arnfjörð Bjarmason
At the start of this function we do: p->fixed = opt->fixed; It's less confusing to use that variable consistently that switch back & forth between the two. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH v2 7/8] grep: do not enter PCRE2_UTF mode on fixed matching

2019-07-26 Thread Ævar Arnfjörð Bjarmason
TF when matching byte-for-byte like that. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 3 ++- t/t7812-grep-icase-non-ascii.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/grep.c b/grep.c index 5bc0f4f32a..c7c06ae08d 100644 --- a/grep.c

[PATCH v2 3/8] grep: stop using a custom JIT stack with PCRE v1

2019-07-26 Thread Ævar Arnfjörð Bjarmason
edge case for v1. 1. https://public-inbox.org/git/capuesphzj_uv9o1-ydpjnla_q-f7gwxz9g1gcy2pyayn8ri...@mail.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 28 +--- grep.h | 5 - 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/grep.c b/gr

[PATCH v2 5/8] grep: create a "is_fixed" member in "grep_pat"

2019-07-26 Thread Ævar Arnfjörð Bjarmason
This change paves the way for later using this value the regex compile functions themselves. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 7 +++ grep.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grep.c b/grep.c index b94e998680..6d60e2e557 100644 --- a

[PATCH v2 2/8] grep: stop "using" a custom JIT stack with PCRE v2

2019-07-26 Thread Ævar Arnfjörð Bjarmason
It's more sane to start with say 32 KB with a max of 1 MB, as pcre2grep.c does. 3. https://public-inbox.org/git/CAPUEspjj+fG8QDmf=bzxktfplgkgiu34htjklhm-cmee04f...@mail.gmail.com/ Reported-by: Carlo Marcelo Arenas Belón Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 10

Re: [PATCH 3/3] grep: stop using a custom JIT stack with PCRE v1

2019-07-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 26 2019, Carlo Arenas wrote: > On Fri, Jul 26, 2019 at 6:50 AM Ævar Arnfjörð Bjarmason > wrote: >> >> On Fri, Jul 26 2019, Carlo Arenas wrote: >> >> > since this moves PCRE1 out of the JIT fast path, >> >> I think you're mostly

Re: [PATCH 3/3] grep: stop using a custom JIT stack with PCRE v1

2019-07-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 26 2019, Carlo Arenas wrote: > since this moves PCRE1 out of the JIT fast path, I think you're mostly replying to the wrong thread. None of the patches I've sent disable PCRE v1 JIT, as the performance numbers show. The JIT stack is resized, and for v2 some dead code removed. > int

Re: [PATCH 2/3] grep: stop "using" a custom JIT stack with PCRE v2

2019-07-24 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 24 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Since we've haven't had any reports of users running into >> PCRE2_ERROR_JIT_STACKLIMIT in the wild I think we can safely assume >> that we can just use the library defa

Re: [PATCH 0/3] grep: PCRE JIT fixes

2019-07-24 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 24 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> There's a couple of patches fixing mistakes in the JIT code I added >> for PCRE in <20190722181923.21572-1-dev+...@drbeat.li> and >> <20190721194052.15440-1-care...@gmail.co

Re: [PATCH] grep: skip UTF8 checks explicitally

2019-07-24 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 24 2019, Johannes Schindelin wrote: > Hi Carlo, > > On Tue, 23 Jul 2019, Carlo Arenas wrote: > >> On Tue, Jul 23, 2019 at 5:47 AM Johannes Schindelin >> wrote: >> > >> > So when PCRE2 complains about the top two bits not being 0x80, it fails >> > to parse the bytes correctly (byte 2

[PATCH 0/3] grep: PCRE JIT fixes

2019-07-24 Thread Ævar Arnfjörð Bjarmason
ving the relevant code. The commit messages for the patches themselves make the case for that. Ævar Arnfjörð Bjarmason (3): grep: remove overly paranoid BUG(...) code grep: stop "using" a custom JIT stack with PCRE v2 grep: stop using a custom JIT

[PATCH 1/3] grep: remove overly paranoid BUG(...) code

2019-07-24 Thread Ævar Arnfjörð Bjarmason
at.li/ Reported-by: Beat Bolli Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/grep.c b/grep.c index f7c3a5803e..be4282fef3 100644 --- a/grep.c +++ b/grep.c @@ -406,14 +406,11 @@ static void compile_pcre1_regexp(st

[PATCH 3/3] grep: stop using a custom JIT stack with PCRE v1

2019-07-24 Thread Ævar Arnfjörð Bjarmason
7820.11: perl grep '[how] to' 0.39(2.13+0.43) 0.40(2.10+0.46) +2.6% 7820.15: perl grep '(e.t[^ ]*|v.ry) rare' 0.44(2.55+0.37) 0.45(2.47+0.41) +2.3% 7820.19: perl grep 'm(ú|u)lt.b(æ|y)te' 0.23(1.06+0.42) 0.22(1.03+0.43)

[PATCH 2/3] grep: stop "using" a custom JIT stack with PCRE v2

2019-07-24 Thread Ævar Arnfjörð Bjarmason
052.15440-1-care...@gmail.com/ 2. I didn't really intend to start with 1 byte, looking at the PCRE v2 code again what happened is that I cargo-culted some of PCRE v2's own test code which was meant to test re-allocations. It's more sane to start with say 32 KB with a max o

Re: [PATCH] grep: skip UTF8 checks explicitally

2019-07-22 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 22 2019, Johannes Schindelin wrote: > Hi Carlo, > > On Sun, 21 Jul 2019, Carlo Marcelo Arenas Belón wrote: > >> Usually PCRE is compiled with JIT support, and therefore the code >> path used includes calling pcre2_jit_match (for PCRE2), that ignores >> invalid UTF-8 in the corpus. >>

Re: [PATCH v2 1/1] gettext: always use UTF-8 on native Windows

2019-07-04 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 03 2019, Karsten Blees via GitGitGadget wrote: > From: Karsten Blees > > On native Windows, Git exclusively uses UTF-8 for console output (both > with MinTTY and native Win32 Console). Gettext uses `setlocale()` to > determine the output encoding for translated text, however, MSVCRT

Re: [PATCH v3 00/10] grep: move from kwset to optional PCRE v2

2019-07-02 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 01 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> This v3 has a new patch (3/10) that I believe fixes the regression on >> MinGW Johannes noted in >> https://public-inbox.org/git/nycvar.qro.7.76.6.1907011515150...@tvgsbejvaqbjf.be

Re: [PATCH v3 1/3] repo-settings: create core.featureAdoptionRate setting

2019-07-02 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 02 2019, Duy Nguyen wrote: > On Mon, Jul 1, 2019 at 10:32 PM Derrick Stolee via GitGitGadget > wrote: >> @@ -601,3 +602,22 @@ core.abbrev:: >> in your repository, which hopefully is enough for >> abbreviated object names to stay unique for some time. >> The m

Re: [PATCH v2 1/3] repo-settings: create core.featureAdoptionRate setting

2019-07-02 Thread Ævar Arnfjörð Bjarmason
On Wed, Jun 19 2019, Derrick Stolee via GitGitGadget wrote: > core.commitGraph:: > If true, then git will read the commit-graph file (if it exists) > - to parse the graph structure of commits. Defaults to false. See > + to parse the graph structure of commits. Defaults to false, u

Re: ab/no-kwset, was Re: What's cooking in git.git (Jun 2019, #07; Fri, 28)

2019-07-01 Thread Ævar Arnfjörð Bjarmason
On Mon, Jul 01 2019, Johannes Schindelin wrote: > Hi Junio & Ævar, > > On Fri, 28 Jun 2019, Junio C Hamano wrote: > >> * ab/no-kwset (2019-06-28) 9 commits >> - grep: use PCRE v2 for optimized fixed-string search >> - grep: remove the kwset optimization >> - grep: drop support for \0 in --fix

[PATCH v3 08/10] grep: drop support for \0 in --fixed-strings

2019-07-01 Thread Ævar Arnfjörð Bjarmason
romise that this would work. By dropping support for this we make it a whole lot easier to move away from the kwset backend, which we'll do in a subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 6 +-- t/t7816-grep-binary-pattern.sh | 82 ++

[PATCH v3 10/10] grep: use PCRE v2 for optimized fixed-string search

2019-07-01 Thread Ævar Arnfjörð Bjarmason
32) -10.4% 4221.12: basic log -i --grep='æ'7.87(7.49+0.29) 7.06(6.69+0.31) -10.3% 4221.13: extended log -i --grep='æ' 7.87(7.54+0.31) 7.09(6.69+0.31) -9.9% 4221.14: perl log -i --grep='æ' 7.06(6.77+0.28) 6.91(6.57+0.31) -2.1

[PATCH v3 09/10] grep: remove the kwset optimization

2019-07-01 Thread Ævar Arnfjörð Bjarmason
-0.5% 4221.13: extended log -i --grep='æ' 7.91(7.51+0.32) 7.87(7.48+0.32) -0.5% 4221.14: perl log -i --grep='æ' 7.01(6.59+0.35) 6.99(6.64+0.28) -0.3% Some of those, as noted in [1] are because PCRE is faster at finding fixed strings. This look

[PATCH v3 03/10] t4210: skip more command-line encoding tests on MinGW

2019-07-01 Thread Ævar Arnfjörð Bjarmason
ot;log" commands to produce an error instead on MinGW. This is because the command-line on that platform implicitly has its encoding changed before being passed to git. See [1]. 1. https://public-inbox.org/git/nycvar.qro.7.76.6.1907011515150...@tvgsbejvaqbjf.bet/ Signed-off-by: Ævar Arnfjörð

[PATCH v3 04/10] grep: inline the return value of a function call used only once

2019-07-01 Thread Ævar Arnfjörð Bjarmason
ter depending on compiler optimizations. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/grep.c b/grep.c index 1de4ab49c0..4e8d0645a8 100644 --- a/grep.c +++ b/grep.c @@ -650,13 +650,11 @@ static void compile_fixed_regexp(st

[PATCH v3 01/10] log tests: test regex backends in "--encode=" tests

2019-07-01 Thread Ævar Arnfjörð Bjarmason
cvar.qro.7.76.6.1906271113090...@tvgsbejvaqbjf.bet/ Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t4210-log-i18n.sh | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/t/t4210-log-i18n.sh b/t/t4210-log-i18n.sh index 7c519436ef..86d22c1d4c

[PATCH v3 02/10] grep: don't use PCRE2?_UTF8 with "log --encoding="

2019-07-01 Thread Ævar Arnfjörð Bjarmason
our default heuristic of assuming the text to be matched is in the user locale encoding isn't true when we've explicitly encoded it to be in a different encoding. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 8 grep.h | 1 + revision.c

[PATCH v3 05/10] grep tests: move "grep binary" alongside the rest

2019-07-01 Thread Ævar Arnfjörð Bjarmason
; test down, leaving the "t7010-setup.sh" test as the next one after that. Signed-off-by: Ævar Arnfjörð Bjarmason --- ...ilter-branch-null-sha1.sh => t7008-filter-branch-null-sha1.sh} | 0 t/{t7008-grep-binary.sh => t7815-grep-binary.sh} | 0 2 files changed,

[PATCH v3 07/10] grep: make the behavior for NUL-byte in patterns sane

2019-07-01 Thread Ævar Arnfjörð Bjarmason
especially since we never documented the old behavior. Doing this also makes it easier to replace the kwset backend with something else, since we'll no longer strictly need it for anything we can't easily use another fixed-string backend for. Signed-off-by: Ævar Arnfjörð Bjarmason ---

[PATCH v3 06/10] grep tests: move binary pattern tests into their own file

2019-07-01 Thread Ævar Arnfjörð Bjarmason
cii strings", 2016-06-25). Subsequent commits will change this behavior. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t7815-grep-binary.sh | 101 - t/t7816-grep-binary-pattern.sh | 114 + 2 files changed, 114 insertions(+)

[PATCH v3 00/10] grep: move from kwset to optional PCRE v2

2019-07-01 Thread Ævar Arnfjörð Bjarmason
sage is the least amount of suck for now. It's really an existing issue with us doing nothing sensible when the log/grep haystack encoding doesn't match the needle encoding supplied via the command line. We swept that under the carpet with the kwset backend, but PCRE v2 exposes it.

Re: [PATCH 0/6] easy bulk commit creation in tests

2019-06-28 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 28 2019, Jeff King wrote: > On Fri, Jun 28, 2019 at 02:41:03AM -0400, Jeff King wrote: > >> I think this would exercise it, at the cost of making the test more >> expensive: >> >> diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh >> index 82d7f7f6a5..8ed6982dcb 100755 >>

Re: [PATCH 1/6] test-lib: introduce test_commit_bulk

2019-06-28 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 28 2019, Jeff King wrote: > Some tests need to create a string of commits. Doing this with > test_commit is very heavy-weight, as it needs at least one process per > commit (and in fact, uses several). > > For bulk creation, we can do much better by using fast-import, but it's > ofte

Re: [PATCH v2 0/9] grep: move from kwset to optional PCRE v2

2019-06-28 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 28 2019, Ævar Arnfjörð Bjarmason wrote: > A non-RFC since it seem people like this approach. > > This should fix the test failure noted by Johannes, there's two new > patches at the start of this series. They address a bug that was there > for a long time, bu

Re: [PATCH] repack: disable bitmaps-by-default if .keep files exist

2019-06-28 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 28 2019, Eric Wong wrote: > Jeff King wrote: >> On Sun, Jun 23, 2019 at 06:08:25PM +, Eric Wong wrote: >> >> > > I'm not sure of the right solution. For maximal backwards-compatibility, >> > > the default for bitmaps could become "if not bare and if there are no >> > > .keep fil

[PATCH v2 9/9] grep: use PCRE v2 for optimized fixed-string search

2019-06-27 Thread Ævar Arnfjörð Bjarmason
rl log -i --grep='æ' 7.06(6.77+0.28) 6.91(6.57+0.31) -2.1% So as with e05b027627 ("grep: use PCRE v2 for optimized fixed-string search", 2019-06-26) there's a huge improvement in performance for "grep", but in "log" most of our time i

[PATCH v2 8/9] grep: remove the kwset optimization

2019-06-27 Thread Ævar Arnfjörð Bjarmason
-0.5% 4221.13: extended log -i --grep='æ' 7.91(7.51+0.32) 7.87(7.48+0.32) -0.5% 4221.14: perl log -i --grep='æ' 7.01(6.59+0.35) 6.99(6.64+0.28) -0.3% Some of those, as noted in [1] are because PCRE is faster at finding fixed strings. This look

[PATCH v2 4/9] grep tests: move "grep binary" alongside the rest

2019-06-27 Thread Ævar Arnfjörð Bjarmason
; test down, leaving the "t7010-setup.sh" test as the next one after that. Signed-off-by: Ævar Arnfjörð Bjarmason --- ...ilter-branch-null-sha1.sh => t7008-filter-branch-null-sha1.sh} | 0 t/{t7008-grep-binary.sh => t7815-grep-binary.sh} | 0 2 files changed,

[PATCH v2 7/9] grep: drop support for \0 in --fixed-strings

2019-06-27 Thread Ævar Arnfjörð Bjarmason
romise that this would work. By dropping support for this we make it a whole lot easier to move away from the kwset backend, which we'll do in a subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 6 +-- t/t7816-grep-binary-pattern.sh | 82 ++

[PATCH v2 6/9] grep: make the behavior for NUL-byte in patterns sane

2019-06-27 Thread Ævar Arnfjörð Bjarmason
especially since we never documented the old behavior. Doing this also makes it easier to replace the kwset backend with something else, since we'll no longer strictly need it for anything we can't easily use another fixed-string backend for. Signed-off-by: Ævar Arnfjörð Bjarmason ---

[PATCH v2 2/9] grep: don't use PCRE2?_UTF8 with "log --encoding="

2019-06-27 Thread Ævar Arnfjörð Bjarmason
our default heuristic of assuming the text to be matched is in the user locale encoding isn't true when we've explicitly encoded it to be in a different encoding. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 8 grep.h | 1 + revision.c

[PATCH v2 1/9] log tests: test regex backends in "--encode=" tests

2019-06-27 Thread Ævar Arnfjörð Bjarmason
cvar.qro.7.76.6.1906271113090...@tvgsbejvaqbjf.bet/ Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t4210-log-i18n.sh | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/t/t4210-log-i18n.sh b/t/t4210-log-i18n.sh index 7c519436ef..86d22c1d4c

[PATCH v2 0/9] grep: move from kwset to optional PCRE v2

2019-06-27 Thread Ævar Arnfjörð Bjarmason
sidering them fixed, except in +cases where "--ignore-case" is provided and they're non-ASCII, see 5c1ebcca4d ("grep/icase: avoid kwsset on literal non-ascii strings", 2016-06-25). Subsequent commits will change this behavior. 4: 0

[PATCH v2 3/9] grep: inline the return value of a function call used only once

2019-06-27 Thread Ævar Arnfjörð Bjarmason
ter depending on compiler optimizations. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/grep.c b/grep.c index 1de4ab49c0..4e8d0645a8 100644 --- a/grep.c +++ b/grep.c @@ -650,13 +650,11 @@ static void compile_fixed_regexp(st

[PATCH v2 5/9] grep tests: move binary pattern tests into their own file

2019-06-27 Thread Ævar Arnfjörð Bjarmason
cii strings", 2016-06-25). Subsequent commits will change this behavior. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t7815-grep-binary.sh | 101 - t/t7816-grep-binary-pattern.sh | 114 + 2 files changed, 114 insertions(+)

Re: [RFC/PATCH 0/7] grep: move from kwset to optional PCRE v2

2019-06-27 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 27 2019, Johannes Schindelin wrote: > Hi Ævar, > > On Wed, 26 Jun 2019, Johannes Schindelin wrote: > >> On Wed, 26 Jun 2019, Ævar Arnfjörð Bjarmason wrote: >> >> > This speeds things up a lot, but as shown in the patches & tests >> > cha

Re: fprintf_ln() is slow

2019-06-27 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 27 2019, Duy Nguyen wrote: > On Thu, Jun 27, 2019 at 1:00 PM Jeff King wrote: >> >> On Thu, Jun 27, 2019 at 01:25:15AM -0400, Jeff King wrote: >> >> > Taylor and I noticed a slowdown in p1451 between v2.20.1 and v2.21.0. I >> > was surprised to find that it bisects to bbb15c5193 (fs

[RFC/PATCH 0/7] grep: move from kwset to optional PCRE v2

2019-06-25 Thread Ævar Arnfjörð Bjarmason
ntax is mostly a subset of PCRE, but again others might thing that's too aggressive and would prefer to keep the distinction, only using PCRE there in place of our current use of kwset. Ævar Arnfjörð Bjarmason (7): grep: inline the return value of a function call used only once grep tests: mo

[RFC/PATCH 3/7] grep tests: move binary pattern tests into their own file

2019-06-25 Thread Ævar Arnfjörð Bjarmason
iteral non-ascii strings", 2016-06-25). Subsequent commits will change this behavior. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t7815-grep-binary.sh | 101 - t/t7816-grep-binary-pattern.sh | 114 + 2 files changed, 114

[RFC/PATCH 4/7] grep: make the behavior for \0 in patterns sane

2019-06-25 Thread Ævar Arnfjörð Bjarmason
es it easier to replace the kwset backend with something else, since we'll no longer strictly need it for anything we can't easily use another fixed-string backend for. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-grep.txt | 17 grep.c | 23 ++

[RFC/PATCH 5/7] grep: drop support for \0 in --fixed-strings

2019-06-25 Thread Ævar Arnfjörð Bjarmason
at this would work, and by dropping support for this we make it a whole lot easier to move away from the kwset backend, which a subsequent change will try to do. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 6 +-- t/t7816-grep-binary-pattern.sh | 82

[RFC/PATCH 7/7] grep: use PCRE v2 for optimized fixed-string search

2019-06-25 Thread Ævar Arnfjörð Bjarmason
27;t acceptable. 1. https://public-inbox.org/git/87v9x793qi@evledraar.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 47 +-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/grep.c b/grep.c index 4716217837..6b75d5be68 100644 --- a/g

[RFC/PATCH 2/7] grep tests: move "grep binary" alongside the rest

2019-06-25 Thread Ævar Arnfjörð Bjarmason
; test down, leaving the "t7010-setup.sh" test as the next one after that. Signed-off-by: Ævar Arnfjörð Bjarmason --- ...ilter-branch-null-sha1.sh => t7008-filter-branch-null-sha1.sh} | 0 t/{t7008-grep-binary.sh => t7815-grep-binary.sh} | 0 2 files changed,

[RFC/PATCH 1/7] grep: inline the return value of a function call used only once

2019-06-25 Thread Ævar Arnfjörð Bjarmason
ter depending on compiler optimizations. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/grep.c b/grep.c index f7c3a5803e..d3e6111c46 100644 --- a/grep.c +++ b/grep.c @@ -650,13 +650,11 @@ static void compile_fixed_regexp(st

[RFC/PATCH 6/7] grep: remove the kwset optimization

2019-06-25 Thread Ævar Arnfjörð Bjarmason
A later change will replace this optimization with a different one, but as removing it and running the tests demonstrates no grep semantics depend on this backend anymore. Signed-off-by: Ævar Arnfjörð Bjarmason --- grep.c | 63 +++--- grep.h

Re: 2.22.0 repack -a duplicating pack contents

2019-06-24 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 24 2019, Jeff King wrote: > On Sun, Jun 23, 2019 at 06:08:25PM +, Eric Wong wrote: > >> > I'm not sure of the right solution. For maximal backwards-compatibility, >> > the default for bitmaps could become "if not bare and if there are no >> > .keep files". But that would mean bit

Re: 2.22.0 repack -a duplicating pack contents

2019-06-23 Thread Ævar Arnfjörð Bjarmason
On Sun, Jun 23 2019, Janos Farkas wrote: > I'm using .keep files to... well.. keep packs to avoid some CPU time > spent on repacking huge packs and make the process somewhat more > incremental. > > Something changed with 22.2.0. Now .bitmap files are also created, > and no simple repacks re-cre

Re: Deadname rewriting

2019-06-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 21 2019, Phil Hord wrote: > On Sat, Jun 15, 2019 at 1:19 AM Ævar Arnfjörð Bjarmason > wrote: >> On Sat, Jun 15 2019, Phil Hord wrote: >> >> > At $work we have a long time employee who has changed their name from >> > Alice to Bob. Bob do

Re: [PATCH 1/1] t0001: fix on case-insensitive filesystems

2019-06-21 Thread Ævar Arnfjörð Bjarmason
On Sun, Jun 09 2019, brian m. carlson wrote: > On 2019-06-08 at 14:43:43, Johannes Schindelin via GitGitGadget wrote: >> diff --git a/t/t0001-init.sh b/t/t0001-init.sh >> index 42a263cada..f54a69e2d9 100755 >> --- a/t/t0001-init.sh >> +++ b/t/t0001-init.sh >> @@ -307,10 +307,20 @@ test_expect_su

Re: [PATCH] tests: mark two failing tests under FAIL_PREREQS

2019-06-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 21 2019, Johannes Schindelin wrote: > Hi Ævar, > > On Thu, 20 Jun 2019, Ævar Arnfjörð Bjarmason wrote: > >> Fix a couple of tests that would potentially fail under >> GIT_TEST_FAIL_PREREQS=true. >> >> I missed these when annotating other tests in

[PATCH] push: make "HEAD:tags/my-tag" consistently push to a branch

2019-06-21 Thread Ævar Arnfjörð Bjarmason
ere we can see if we have both a DWYM match and a match based on the prefix of the LHS of the refspec, in those cases the match based on the LHS's ref prefix should win. 1. https://lore.kernel.org/lkml/2d55fd2a-afbf-1b7c-ca82-8bffaa18e...@redhat.com/ 2. https://public-inbox.org/git/2019052

[PATCH v3 4/8] t6040 test: stop using global "script" variable

2019-06-21 Thread Ævar Arnfjörð Bjarmason
script" variable twice it implicitly depends on the C_LOCALE_OUTPUT prerequisite not being a lazy prerequisite. A follow-up change will make it a lazy prerequisite, so we must remove this landmine before inadvertently stepping on it as we make that change. Signed-off-by: Ævar Arnfjörð Bj

[PATCH v3 1/8] config tests: simplify include cycle test

2019-06-21 Thread Ævar Arnfjörð Bjarmason
tem/global config for default trace2 settings", 2019-04-15). So let's remove the testing for that potential regression here, I'll instead add it explicitly to t0017-env-helper.sh in a follow-up change. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t1305-config-include.sh | 21 +++-

[PATCH v3 7/8] tests: replace test_tristate with "git env--helper"

2019-06-21 Thread Ævar Arnfjörð Bjarmason
ons.sh goes away in addition to test_tristate(). We still need the test_skip_or_die() helper, but now it takes the variable name instead of the value, and uses "git env--bool" to distinguish a default "true" from an explicit "true" (in those "explicit true&

[PATCH v3 3/8] config.c: refactor die_bad_number() to not call gettext() early

2019-06-21 Thread Ævar Arnfjörð Bjarmason
that subsequent change easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason --- config.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/config.c b/config.c index 296a6d9cc4..374cb33005 100644 --- a/config.c +++ b/config.c @@ -949,34 +949,35 @

[PATCH v3 8/8] tests: make GIT_TEST_FAIL_PREREQS a boolean

2019-06-21 Thread Ævar Arnfjörð Bjarmason
-n" for the purposes of the shell code, and change the user-exposed and documented GIT_TEST_FAIL_PREREQS variable to a boolean. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/README| 2 +- t/t-basic.sh| 10 +- t/test-lib-functions.sh | 4 ++-- t/test-lib.sh

[PATCH v3 6/8] tests README: re-flow a previously changed paragraph

2019-06-21 Thread Ævar Arnfjörð Bjarmason
A previous change to the "GIT_TEST_GETTEXT_POISON" variable left this paragraph needing to be re-flowed. Let's do that in this separate change to make it easy to see that there's no change here when viewed with "--word-diff". Signed-off-by: Ævar Arnfjörð Bjarmason

[PATCH v3 5/8] tests: make GIT_TEST_GETTEXT_POISON a boolean

2019-06-21 Thread Ævar Arnfjörð Bjarmason
d make all the relevant GIT_TEST_* variables boolean in the same way than carry the "YesPlease" special-case forward. 1. https://public-inbox.org/git/xmqqtvckm3h8@gitster-ct.c.googlers.com/ Signed-off-by: Ævar Arnfjörð Bjarmason --- ci/lib.sh | 2 +- config.c

[PATCH v3 2/8] env--helper: new undocumented builtin wrapping git_env_*()

2019-06-21 Thread Ævar Arnfjörð Bjarmason
s, but not --type=ulong. I figured it was easy enough to add it & test for it so I left it in so we'd have wrappers for both git_env_*() functions, and to have a template to make it obvious how we'd add --type=int etc. if it's needed in the future. Signed-off-by: Ævar Arnfjörð

[PATCH v3 0/8] Change GIT_TEST_* variables to

2019-06-21 Thread Ævar Arnfjörð Bjarmason
Now with: * The --type=bool etc. Ui change to env--bool. * I considered supporting YesPlease for gettext poison, but didn't go for it. Details in updated commit message. * "default" "case" arm fork warning on some compilers. Ævar Arnfjörð Bjarmason (8): confi

Re: [PATCH v2 2/8] env--helper: new undocumented builtin wrapping git_env_*()

2019-06-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 21 2019, Junio C Hamano wrote: > Junio C Hamano writes: > >> ... >> as I am getting >> >> error: 'ret' may be used uninitialized in this function >> [-Werror=maybe-uninitialized] >> >> from here. >> >> Giving an otherwise useless initial value to ret would be a >> workaround. >

Re: [RFC/PATCH] gc: run more pre-detach operations under lock

2019-06-20 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 20 2019, Duy Nguyen wrote: > On Thu, Jun 20, 2019 at 5:49 AM Ævar Arnfjörð Bjarmason > wrote: >> >> >> On Wed, Jun 19 2019, Jeff King wrote: >> >> > On Wed, Jun 19, 2019 at 08:01:55PM +0200, Ævar Arnfjörð Bjarmason wrote: >> > >

[PATCH v2 5/8] tests: make GIT_TEST_GETTEXT_POISON a boolean

2019-06-20 Thread Ævar Arnfjörð Bjarmason
N was true or not. I'm crossing my fingers and hoping that a test similar to the one I removed in the earlier "config tests: simplify include cycle test" change in this series won't happen again, and testing for this explicitly in "env--helper"'s own tests. S

[PATCH v2 8/8] tests: make GIT_TEST_FAIL_PREREQS a boolean

2019-06-20 Thread Ævar Arnfjörð Bjarmason
-n" for the purposes of the shell code, and change the user-exposed and documented GIT_TEST_FAIL_PREREQS variable to a boolean. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/README| 2 +- t/t-basic.sh| 10 +- t/test-lib-functions.sh | 2 +- t/test-lib.sh

[PATCH v2 7/8] tests: replace test_tristate with "git env--helper"

2019-06-20 Thread Ævar Arnfjörð Bjarmason
ons.sh goes away in addition to test_tristate(). We still need the test_skip_or_die() helper, but now it takes the variable name instead of the value, and uses "git env--bool" to distinguish a default "true" from an explicit "true" (in those "explicit true&

  1   2   3   4   5   6   7   8   9   10   >