Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regex matching appears to not work. #2

Closed
kentfredric opened this issue May 14, 2017 · 8 comments
Closed

regex matching appears to not work. #2

kentfredric opened this issue May 14, 2017 · 8 comments
Assignees
Labels

Comments

@kentfredric
Copy link

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=

@atoomic atoomic self-assigned this May 14, 2017
@atoomic
Copy link
Member

atoomic commented May 14, 2017

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

@Grinnz
Copy link
Contributor

Grinnz commented May 16, 2017

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.

@toddr
Copy link
Member

toddr commented May 17, 2017

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"

@Grinnz
Copy link
Contributor

Grinnz commented May 17, 2017

Yes, but it is mislabeled. The man page specifies that it is linking to libpcre.

@atoomic atoomic added the bug label Jul 14, 2017
@atoomic
Copy link
Member

atoomic commented Jul 14, 2017

/usr/bin/git grep -l -P 'sub\s' -- distros/
fatal: cannot use Perl-compatible regexes when not compiled with USE_LIBPCRE

@atoomic
Copy link
Member

atoomic commented Jul 14, 2017

git was not compiled with lib-pcre on the server, need to recompile it with pure among other dependencies, looks ok now in production

@toddr
Copy link
Member

toddr commented Jul 16, 2017

git build process for 2.13.3:

USE_LIBPCRE=YesPlease NO_TCLTK=1 ./configure --prefix=/home/toddr/git --with-libpcre && make -j18 install

@atoomic
Copy link
Member

atoomic commented Jul 17, 2017

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:

  • m4 ( required for autoconf )
  • autoconf ( yes really )
  • pcre (used 8.41)
  • gettext (used 0.19.8.1)

and then git itself (version 2.13.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants