Re: Git Modifying DLL
From: Jonathon Anderson <hidden>
Date: 2021-08-20 18:47:18
On Fri, Aug 20, 2021 at 1:00 PM Jeff King [off-list ref] wrote:
On Thu, Aug 19, 2021 at 01:21:03PM -0500, Jonathon Anderson wrote:quoted
I had not. I tested that and it worked. I assumed that git would automatically treat dll files as binary. Thanks for the help!Git doesn't know about any file extensions by default. Its default "is it binary" test looks for NUL bytes in the first 8k or so of the file. I'd expect your DLL would probably have such a NUL byte. Is it possible you have other .gitattributes set which are confusing things? You might try: git check-attr --all <path> or: git ls-files --stdin | git check-attr --stdin --all -Peff
When I remove '*.dll binary" from .gitattributes, I get this: $ git check-attr --all ./PSWindowsUpdate.dll ./PSWindowsUpdate.dll: text: set ./PSWindowsUpdate.dll: eol: lf When I add "*.dll binary" to .gitattributes, I get this: $ git check-attr --all ./PSWindowsUpdate.dll ./PSWindowsUpdate.dll: binary: set ./PSWindowsUpdate.dll: diff: unset ./PSWindowsUpdate.dll: merge: unset ./PSWindowsUpdate.dll: text: unset ./PSWindowsUpdate.dll: eol: lf I can also confirm that there are null bytes in the first 8k bytes. These are the first 16 bytes 4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00 Thanks, Jonathon