The `grep` binary shipped with Git for Windows is from MSYS2 and hence it 
requires the MSYS2 libraries:
$ ls -lh /c/tmp/git-grep/
total 4.9M
-rwxr-xr-x 1 enrico None 210K Mar 11  2016 grep.exe
-rwxr-xr-x 1 enrico None 3.3M Sep  9 09:38 msys-2.0.dll
-rwxr-xr-x 1 enrico None 108K Apr  1  2016 msys-gcc_s-1.dll
-rwxr-xr-x 1 enrico None 912K Nov  4  2014 msys-iconv-2.dll
-rwxr-xr-x 1 enrico None  44K Mar  2  2016 msys-intl-8.dll
-rwxr-xr-x 1 enrico None 282K Jan 20  2016 msys-pcre-1.dll
These are the required libraries for grep.exe and as you can see, it would 
require about 5 MB more space. Compared to the overall size of the Windows 
binaries and their dependencies, this is not that much. I'm not yet completely 
sure why the MSYS2 grep works that differently, maybe because it uses the MSYS2 
path manipulation magic behind the scenes.

I tried to self-compile grep using the patch which is used by MSYS2 
 which "only" modifies the build environment but the resulting binary has the 
recursion problem again.
So I assume there is something in the MSYS2 libraries which changes the 
behaviour of handling paths and their encodings.

After all the troubles we had with `grep` on Windows so far, I'm actually 
tempted to bundle the MSYS2 binary along with the necessary libraries. At least 
this would safe us from the ugly patching in #1237.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:

Reply via email to