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

Re: utf8 BOM

From
Dmitry Potapov <dpotapov@gmail.com>
Date
May 16, 2010, 13:32 UTC
Message-ID
<20100516133259.GC17200@dpotapov.dyndns.org>
In-Reply-To
<20100516112612.GV2480@ece.pdx.edu>
On Sun, May 16, 2010 at 04:26:12AM -0700, Tait wrote:
Show 8 quoted lines
> > Okay, so something that checks text files to see if they're utf...
> > "core.autoutf", anyone?
> 
> This (and crlf-conversion, for that matter) strikes me as something best 
> handled outside of git core, such as through checkout/commit hooks. Perhaps 
> examples of such hooks could be provided and adapted by each project and 
> user as that user/project sees fit for their specific choice of repository 
> format and development environment.
There are a few problems with using filters for crlf conversion:
1. It is a way too slow... Running a script for each file is in a repo
is even slow on Linux, and on Windows, it is going to be horrible slow.
2. You have to install this filter in every clone, and by the time when
you install it, your repository is already checked out with the wrong
ending. So, you need to fix it.

While using scripts is good where you need flexibility, it is not the case with crlf conversion. Users want it to just work, and they want simple and easy to understand rules how to mark what files should and should not be converted. If every project is going with itw own rules and scripts, it is going to be a big mess.

Now, when we speak about charset encoding, it could make sense to try this new feature as a filter, but if it is something that is to be used widely, it should be eventually re-written in C.

Dmitry
Previous: TaitNext: Eyvind Bernhardsen
Message 16 of 27 in “End-of-line normalization, redesigned”
  1. 0/5 End-of-line normalization, redesignedEyvind Bernhardsen, May 12, 2010
  2. 1/5 autocrlf: Make it work also for un-normalized repositoriesEyvind Bernhardsen, May 12, 2010
  3. 2/5 Add tests for per-repository eol normalizationEyvind Bernhardsen, May 12, 2010
  4. 3/5 Add per-repository eol normalizationEyvind Bernhardsen, May 12, 2010
  5. 4/5 Rename "crlf" attribute as "eolconv"Eyvind Bernhardsen, May 12, 2010
  6. Linus TorvaldsMay 13, 2010
  7. Robert BuckMay 13, 2010
  8. Robert BuckMay 13, 2010
  9. Eyvind BernhardsenMay 13, 2010
  10. Robert BuckMay 13, 2010
  11. utf8 BOMDmitry Potapov, May 14, 2010
  12. Eyvind BernhardsenMay 15, 2010
  13. Dmitry PotapovMay 16, 2010
  14. Eyvind BernhardsenMay 16, 2010
  15. TaitMay 16, 2010
  16. Dmitry PotapovMay 16, 2010
  17. Eyvind BernhardsenMay 13, 2010
  18. Linus TorvaldsMay 13, 2010
  19. Robert BuckMay 14, 2010
  20. Jonathan NiederMay 14, 2010
  21. Eyvind BernhardsenMay 14, 2010
  22. Eyvind BernhardsenMay 14, 2010
  23. Eyvind BernhardsenMay 14, 2010
  24. Linus TorvaldsMay 14, 2010
  25. Add "core.eol" variable to control end-of-line conversionEyvind Bernhardsen, May 15, 2010
  26. Robert BuckMay 16, 2010
  27. 5/5 Rename "core.autocrlf" config variable as "core.eolconv"Eyvind Bernhardsen, May 12, 2010

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.