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

what file extensions must be explicitly configured with respect to eol-type in gitattributes?

From
Robert Buck <buck.robert.j@gmail.com>
Date
Sep 20, 2010, 16:19 UTC
Message-ID
<AANLkTikK2oL3sUYHdqoQ7C47nd6Pi53N17GSfh8nx6Q-@mail.gmail.com>
Hello,

One project we have in house has approximately 160 different file extensions used for the files checked in. In our repository there are files that MUST be CRLF (.bat, .cmd, .vcproj, etc), files that MUST be LF (.xml, .xsl, .sh, etc), and files that MUST be binary. All others are just text and so long as they appear in native form I'd be happy.

It would seem a default rule to handle text files would make sense:
* text=auto

But I have not found material explaining how git identifies binary files, so one concern would be that it could mangle binary file types in some cases.

Do I have to explicitly mention all 160 file types in the gitattributes file?

How does git internally determine whether a file is text vs binary? Does it use the 'file' command in Unix?

And where I am going with this specifically is a question: what rules MUST be specifically stated in gitattributes and what rules are there implicitly?

Thank you,
Bob
Next: Erik Faye-Lund
Message 1 of 2 in “what file extensions must be explicitly configured with respect to eol-type in gitattributes?”
  1. Robert BuckSep 20, 2010
  2. Erik Faye-LundSep 20, 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.