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

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

 



In my case, I compiled git with pcre2 support, using third party PCRE2 library: https://github.com/PCRE2Project/pcre2
 and PCRE and multibyte support in git works with it just fine.

E.g. adding and committing a file:


```
#!/usr/bin/env node

console.log('顔🏁');
```

and searching it with

git log --all -p  -G '顔🏁’

works. 

Again, perhaps the solution here is to distinguish two cases:

1. git is compiled with native regex library on macOS 
2. git is compiled with third party regex library with PCRE and multibyte support on macOS

in case 2 everything works. 

Case 1 is perhaps more work on macOS and a feature request.



> On Mar 27, 2023, at 12:30 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> 
> Mario Grgic <mario_grgic@xxxxxxxxxxx> writes:
> 
>> Confirming that putting back NO_REGEX = YesPlease in the Makefile fixes the problem. I.e. the following patch fixes it for me:
>> 
>> --- Makefile	2023-03-25 11:24:01.000000000 -0400
>> +++ Makefile.patched	2023-03-25 11:25:11.000000000 -0400
>> @@ -1554,6 +1554,7 @@
>> 		APPLE_COMMON_CRYPTO = YesPlease
>> 		COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO
>> 	endif
>> +	NO_REGEX = YesPlease
>> 	PTHREAD_LIBS =
>> endif
> 
> It will unfortunately break multibyte support on macOS by reverting
> what 1819ad32 (grep: fix multibyte regex handling under macOS,
> 2022-08-26) did.





[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