From: D. Ben Knoble Date: Wed, 02 Sep 2026 12:14:19 GMT Subject: Re: AI Textconv filter misconfiguration on Windows leads to silent corruption of diff output (ongoing investigation) Message-ID: In-Reply-To: <000601dd3a5b$3e4be8a0$bae3b9e0$@nexbridge.com> On Tue, Sep 1, 2026 at 5:59 PM wrote: > > On September 1, 2026 4:14 PM, Skybuck Flying wrote: > >MORE GOD DAMN PROBLEMS WITH GIT AND CR/LF FILTERS. > > > >I DOWNLOADED/GIT CLONED: > > > >https://github.com/openai/openai-openapi/tree/main > > > >I NOTICED: > > > >https://github.com/openai/openai-openapi/tree/main/assets > > > >WAS CORRUPTED. > > > >(CORRECT DOWNLOAD METHOD USES TO PROVE FILE IS INTACT ON SERVER): > > > >curl -L --output "K:\Delphi\Specifications\OpenAI API\github version 3.1.0 (1 > >september 2026)\assets\openai-api-referencev2.png" > >https://raw.githubusercontent.com/openai/openai- > >openapi/master/assets/openai-api-reference.png > > > >GOOD THING I INSPECTED IT JUST OUT OF CURIOSITY. > > > >I IMMEDIATELY EXPECTED GIT FILTER TO BE THE CAUSE. > > > >DIAGNOSIS COMMANDS. > > > >" > >Microsoft Windows [Version 10.0.22631.6199] > >(c) Microsoft Corporation. All rights reserved. > > > >C:\Users\skybu>git config --global core.autocrlf false > > > >C:\Users\skybu>git config --system core.autocrlf false > > > >C:\Users\skybu>git config --local core.autocrlf > >fatal: --local can only be used inside a git repository > > > >C:\Users\skybu>git config --global --get-regexp filter > > > >C:\Users\skybu>git config --local --get-regexp filter > >fatal: --local can only be used inside a git repository > > > >C:\Users\skybu>git check-attr -a openai-api-reference.png > >fatal: not a git repository (or any of the parent directories): .git > > > >C:\Users\skybu>type .gitattributes > >* text diff=lfclean > >C:\Users\skybu>git config --global --list core.autocrlf=false core.eol=crlf > >core.sshcommand=C:/Windows/System32/OpenSSH/ssh.exe > >core.attributesfile=C:\Users\skybu\.gitattributes > >user.email=skybuck2000@hotmail.com > >user.name=Skybuck Flying > >user.signingkey=I:\Informatie\Van mezelf\SSH Keys\PrivateKey\GitSigningKey > >gui.recentrepo=V:/FuckingWhore/vite-wallet > >cinnabar.version-check=1743733941 > >credential.http://localhost:3000.provider=generic > >includeif.gitdir:V:/AI0001/.path=~/.gitconfigs/.gitconfig-ai0001-v2 > >includeif.gitdir:V:/AI0002/.path=~/.gitconfigs/.gitconfig-ai0002-v2 > >includeif.gitdir:V:/AI0003/.path=~/.gitconfigs/.gitconfig-ai0003-v2 > >includeif.gitdir:V:/AI0004/.path=~/.gitconfigs/.gitconfig-ai0004-v2 > >includeif.gitdir:V:/AI0005/.path=~/.gitconfigs/.gitconfig-ai0005-v2 > >includeif.gitdir:V:/AI0006/.path=~/.gitconfigs/.gitconfig-ai0006-v2 > >includeif.gitdir:V:/AI0007/.path=~/.gitconfigs/.gitconfig-ai0007-v2 > >includeif.gitdir:V:/AI0008/.path=~/.gitconfigs/.gitconfig-ai0008-v2 > >includeif.gitdir:V:/AI0009/.path=~/.gitconfigs/.gitconfig-ai0009-v2 > >includeif.gitdir:V:/AI0010/.path=~/.gitconfigs/.gitconfig-ai0010-v2 > >includeif.gitdir:V:/AI0011/.path=~/.gitconfigs/.gitconfig-ai0011-v2 > >includeif.gitdir:V:/AI0012/.path=~/.gitconfigs/.gitconfig-ai0012-v2 > >includeif.gitdir:V:/AI0013/.path=~/.gitconfigs/.gitconfig-ai0013-v2 > >includeif.gitdir:V:/AI0014/.path=~/.gitconfigs/.gitconfig-ai0014-v2 > >includeif.gitdir:V:/AI0015/.path=~/.gitconfigs/.gitconfig-ai0015-v2 > >includeif.gitdir:V:/AI0016/.path=~/.gitconfigs/.gitconfig-ai0016-v2 > >includeif.gitdir:V:/AI0017/.path=~/.gitconfigs/.gitconfig-ai0017-v2 > >includeif.gitdir:V:/AI0018/.path=~/.gitconfigs/.gitconfig-ai0018-v2 > >includeif.gitdir:V:/AI0019/.path=~/.gitconfigs/.gitconfig-ai0019-v2 > >includeif.gitdir:V:/AI0020/.path=~/.gitconfigs/.gitconfig-ai0020-v2 > >includeif.gitdir:V:/AIMain/.path=~/.gitconfigs/.gitconfig-aimain-v2 > >merge.tool=meld > >mergetool.prompt=false > >mergetool.keepbackup=false > >gpg.format=ssh > >commit.gpgsign=true > >log.showsignature=true > >gpg.ssh.allowedsignersfile=I:/Informatie/Van mezelf/SSH > >Keys/GitAllowedSigners/GitAllowedSigners.txt > >diff.lfclean.textconv=sed -e s/\\r// > >diff.lfclean.binary=false > > > >C:\Users\skybu>git check-attr --all -- openai-api-reference.png > >fatal: not a git repository (or any of the parent directories): .git > > > >C:\Users\skybu> > >" > > > >HYPOTHESIS BY CO-PILOT AND POSSIBLE FIX: > > > >The **smoking gun is now visible**: your global config + your global attributes file > >**are applying a custom diff filter (`lfclean`) to *all files*** — including PNGs. > >That is exactly why your Git‑downloaded PNG is corrupted while the curl version is > >intact. > > [snip] > > Just some musings from my own frustration in this area. > > Having gone through some similar things, I would ignore CoPilot. There are other words I would use as well but they are not for polite company. > > Set autocrlf=input not false. Also it is a good idea to set ignorecase=true and filemode=false on Windows. > > Git tends to give preferential treatment to text files, only looking at the first hunk (whatever that might be) looking for non-text characters. CR is text, so a file containing those near the front will probably be consider text unless explicitly marked as binary. If you are sure you have binary files, declare them. Do not assume git will always get it right - although .EXE, .ZIP, .JPG, and .PNG are pretty much always binary. Yeah, I suspect the "* text" is more likely the culprit than "* diff=lfclean": I don't think Git runs diff-filters on blobs to produce the checked out versions. That is, I don't think anyone is doing the equivalent o <$input sed -e s/\\r// >$output where input is the PNG blob and output is the corrupted filename. (CoPilot seems confidently wrong as usual about this.) Instead, we can check "git help attributes" to see what happens. 1. The text attribute enables some conversion of line endings: always LF in the index, and possibly converted in the working tree. This attribute marks the path as a text file, which enables end-of-line conversion: When a matching file is added to the index, the file’s line endings are normalized to LF in the index. Conversely, when the file is copied from the index to the working directory, its line endings may be converted from LF to CRLF depending on the eol attribute, the Git config, and the platform (see explanation of eol below). 2. The eol attribute when unspecified uses core.autocrlf or core.eol config; when _those_ are unspecified, it's crlf on Windows (converting LF to CRLF). If the eol attribute is unspecified for a file, its line endings in the working directory are determined by the core.autocrlf or core.eol configuration variable (see the definitions of those options in git-config(1)). If text is set but neither of those variables is, the default is eol=crlf on Windows and eol=lf on all other platforms. So as Randall says, don't tell Git files are text if they aren't :) Using "* text=auto" might be safer (allowing Git to decide whether a file is text) if you need line ending normalization. -- D. Ben Knoble