From: Junio C Hamano <gitster@pobox.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Sjur Moshagen <sjurnm@mac.com>, git@vger.kernel.org
Subject: Re: BUGREPORT: Modified files on a fresh clone on M2 MacBook Pro
Date: Thu, 23 Mar 2023 21:45:37 -0700 [thread overview]
Message-ID: <xmqqr0te69la.fsf@gitster.g> (raw)
In-Reply-To: 20230323053110.z64tcce5dy3q7yew@tb-raspi4
Torsten Bögershausen <tboegi@web.de> writes:
> 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.
prev parent reply other threads:[~2023-03-24 4:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 16:28 BUGREPORT: Modified files on a fresh clone on M2 MacBook Pro Sjur Moshagen
2023-03-22 16:46 ` Emily Shaffer
2023-03-22 17:29 ` Sjur Moshagen
2023-03-22 18:22 ` Kristoffer Haugsbakk
2023-03-22 18:47 ` Sjur Moshagen
2023-03-22 19:18 ` Junio C Hamano
2023-03-22 20:00 ` Kristoffer Haugsbakk
2023-03-22 21:09 ` Sjur Moshagen
2023-03-22 17:33 ` Jeff King
2023-03-22 17:44 ` Jeff King
2023-03-23 5:31 ` Torsten Bögershausen
2023-03-24 4:45 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr0te69la.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sjurnm@mac.com \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).