git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathon Anderson <janderson@acesquality.com>
To: Jeff King <peff@peff.net>
Cc: "Randall S. Becker" <rsbecker@nexbridge.com>, git@vger.kernel.org
Subject: Re: Git Modifying DLL
Date: Fri, 20 Aug 2021 13:47:02 -0500	[thread overview]
Message-ID: <CAG83euofNXHx8-=7Obj-Ju5U_fjwNBuLVJjmccVhe9bqRFyBiw@mail.gmail.com> (raw)
In-Reply-To: <YR/tyHWQ6+2sP2iA@coredump.intra.peff.net>

On Fri, Aug 20, 2021 at 1:00 PM Jeff King <peff@peff.net> wrote:
>
> On Thu, Aug 19, 2021 at 01:21:03PM -0500, Jonathon Anderson wrote:
>
> > 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

  reply	other threads:[~2021-08-20 18:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 17:58 Git Modifying DLL Jonathon Anderson
2021-08-19 18:13 ` Randall S. Becker
2021-08-19 18:21   ` Jonathon Anderson
2021-08-20 15:37     ` Torsten Bögershausen
2021-08-20 18:00     ` Jeff King
2021-08-20 18:47       ` Jonathon Anderson [this message]
2021-08-20 19:14         ` brian m. carlson
2021-08-20 19:51           ` Randall S. Becker
2021-09-01 21:07             ` Jonathon Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG83euofNXHx8-=7Obj-Ju5U_fjwNBuLVJjmccVhe9bqRFyBiw@mail.gmail.com' \
    --to=janderson@acesquality.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=rsbecker@nexbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).