git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Potential bug: Git instantly converts utf-8-bom to utf-8

From
Mmessester <cnotsomark@gmail.com>
Date
Apr 14, 2025, 15:59 UTC
Message-ID
<DM6PR12MB386578E1F28B532600ADF575F7B32@DM6PR12MB3865.namprd12.prod.outlook.com>

How this occurs: When I clone the git repository https://github.com/NinekoTheCat/infinilore.cs.git into an empty directory and run git status it shows changes where all the files are deleted and then added again. The difference seems to be in the first line as opening it in a text editor aware of encodings shows the change from utf-8-bom to utf-8. (Attached to this email is an example patch file).

My git configuration in the directory is: --- diff.astextplain.textconv=astextplain filter.lfs.clean=git-lfs clean -- %f filter.lfs.smudge=git-lfs smudge -- %f filter.lfs.process=git-lfs filter-process filter.lfs.required=true http.sslbackend=openssl http.sslcainfo=REDACT.crt core.autocrlf=true core.fscache=true core.symlinks=false pull.rebase=false credential.helper=manager credential.https://dev.azure.com.usehttppath=true init.defaultbranch=main filter.lfs.clean=git-lfs clean -- %f filter.lfs.smudge=git-lfs smudge -- %f filter.lfs.process=git-lfs filter-process filter.lfs.required=true user.name=REDACT user.email=REDACT user.signingkey=4D973217092A925B core.editor="C:\Users\cnots\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait safe.directory=REDACT commit.gpgsign=true gpg.program=C:\Program Files (x86)\GnuPG\bin\gpg.exe credential.https://github.com.helper= credential.https://github.com.helper=!REDACT credential.https://gist.github.com.helper= credential.https://gist.github.com.helper=!REDACT --- and the version of git I use is 2.49.0.windows.1.

I'd be very very grateful if anyone could explain what's going on and have a solution.
Next: Lucas Seiki Oshiro
Message 1 of 4 in “Potential bug: Git instantly converts utf-8-bom to utf-8”
  1. messesterApr 14, 2025
  2. Lucas Seiki OshiroApr 14, 2025
  3. Torsten BögershausenApr 14, 2025
  4. Junio C HamanoApr 14, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.