Closed kentfredric closed 7 years ago
interesting... I can clearly reproduce the issue in production... working as expected on my sandbox wonder if it s not coming from the git version, going to try to use the system one
Also for the sake of clarity, it would be a good idea to label the search as PCRE regex, as git does not use Perl regex.
Also for the sake of clarity, it would be a good idea to label the search as PCRE regex, as git does not use Perl regex.
@Grinnz the interesting thing about that is that the git grep command line option is actually: "--perl-regexp"
Yes, but it is mislabeled. The man page specifies that it is linking to libpcre.
/usr/bin/git grep -l -P 'sub\s' -- distros/
fatal: cannot use Perl-compatible regexes when not compiled with USE_LIBPCRE
git was not compiled with lib-pcre on the server, need to recompile it with pure among other dependencies, looks ok now in production
git build process for 2.13.3:
USE_LIBPCRE=YesPlease NO_TCLTK=1 ./configure --prefix=/home/toddr/git --with-libpcre && make -j18 install
For informations, after recompiling a few requires libraries, here is the command I run to recompile git in my user directory with pure support
CPPFLAGS=-I/home/atoomic/include LDFLAGS=-L/home/atoomic/lib ./configure --prefix=/home/atoomic/ --with-libpcre --without-tcltk
List of required dependencies:
and then git itself (version 2.13.3)
The first things I tried included whitespace matches and character classes:
sub\s
returns no matches: https://grep.metacpan.org/search?size=20&q=sub\s&qd=&qft=do\s
returns no matches: https://grep.metacpan.org/search?q=do\s&qd=&qft=[s][u][b]
returns no matches: https://grep.metacpan.org/search?q=[s][u][b]&qd=&qft=[ ]
returns (a character set including only space) no matches: https://grep.metacpan.org/search?q=[+]&qd=&qft=