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

Re: BUGREPORT: Modified files on a fresh clone on M2 MacBook Pro

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 24, 2023, 04:45 UTC
Message-ID
<xmqqr0te69la.fsf@gitster.g>
In-Reply-To
<20230323053110.z64tcce5dy3q7yew@tb-raspi4>
Torsten Bögershausen <tboegi@web.de> writes:
Show 12 quoted lines
> The general rule and recommendation would be to start the text attributes
> definition by using a "catch all" rule, followed by files that need
> special treatment.
> The very first text/binary line would be
> * text=auto
> which will tell Git to auto-detect all files (and file types),
> see below,
> This basically prevents corruption of binary files.
> which are not mentioned later.
> Like README.md, LICENCE and so on.
> Then there is a list of file extension, that are known to be binary,
> you can add them as shown below.
Thanks for writing this down clearly.

If I would add one thing to the general advice, it is that it applies o those who are using Git primarily as their source code, not binary asset, control system, which roughly translates to "for most of the paths in the project, 'git diff' without using any external diff driver is useful". In such an environment, "everything by default is text, and only selected few are not" would work very well. If on the other hand there are myriad of binary asset of different types, it can become cumbersome to mark them "do not try normalizing the eol, which is done to help cross platform development" individually.

Previous: Torsten Bögershausen
Message 12 of 12 in “BUGREPORT: Modified files on a fresh clone on M2 MacBook Pro”
  1. Sjur MoshagenMar 22, 2023
  2. Emily ShafferMar 22, 2023
  3. Sjur MoshagenMar 22, 2023
  4. Kristoffer HaugsbakkMar 22, 2023
  5. Sjur MoshagenMar 22, 2023
  6. Junio C HamanoMar 22, 2023
  7. Kristoffer HaugsbakkMar 22, 2023
  8. Sjur MoshagenMar 22, 2023
  9. Jeff KingMar 22, 2023
  10. Jeff KingMar 22, 2023
  11. Torsten BögershausenMar 23, 2023
  12. Junio C HamanoMar 24, 2023

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.