Re: git bug: Perl compatible regular expressions do not work as expected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 25.03.23 um 14:09 schrieb Mario Grgic:
> The lowercase -p is to print the output in patch format. You can rewrite the command line as
>
>  git log --all --patch --perl-regexp -G '\bmain\b’
>
> I still get no output in any git version after 2.38.4

-G doesn't support Perl regular expressions.  --perl-regexp only affects
--grep, --grep-reflog, --author, and --committer.  Neither POSIX basic
nor extended regular expressions support \b as word boundary.  GNU regex
and our compat/regex/ do, as extensions.  macOS regex supports it if the
flag REG_ENHANCED is given to regcomp(3).

So perhaps this is rather a feature request to support Perl regular
expressions for -G (and probably -S as well).  Or to enable REG_ENHANCED
for them, at least, like 54463d32ef (use enhanced basic regular
expressions on macOS, 2023-01-08) did to get alternations for git grep
on macOS.

René





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux