git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: osx autocrlf sanity?
Date: Wed, 10 Jun 2020 00:03:58 +0000	[thread overview]
Message-ID: <20200610000358.GR6569@camp.crustytoothpaste.net> (raw)
In-Reply-To: <CACPiFCK0h0LfdyE6Q=UJkuX+Qdb=rULcgDJwgxQ0w-1O0zpMew@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]

On 2020-06-09 at 23:31:23, Martin Langhoff wrote:
> Hi Brian,
> 
> good question! There is a .gitattributes file, all the files affected
> have these attributes
> 
> *.py     text diff=python

By default, Git will check out files with the text attribute with the
native line ending, and it will check them in with LF endings.  That can
be controlled by core.eol and core.autocrlf.

If the file in the repository (as shown by a "git show HEAD:filename")
has CRLF endings (usually less shows this as "^M"), then the user has
done something naughty by overriding the .gitattributes file with local
overrides and checking data in nevertheless.  If so, you'll have
problems on a Unix system pretty much regardless, unless you set
core.eol to "crlf", in which case you'll get all CRLF files.

It may be instructive to run "git diff --ws-error-highlight=all" to see
what the changes are in the working tree compared to what's checked in.
I suspect it will probably be line endings only.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2020-06-10  0:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 19:52 osx autocrlf sanity? Martin Langhoff
2020-06-09 23:13 ` brian m. carlson
2020-06-09 23:31   ` Martin Langhoff
2020-06-10  0:03     ` brian m. carlson [this message]
2020-06-10 13:55       ` Martin Langhoff
2020-06-10 13:59         ` Randall S. Becker
2020-06-10 14:19           ` Martin Langhoff
2020-06-10 23:53         ` brian m. carlson
2020-06-10 14:34     ` Torsten Bögershausen
2020-06-10 14:51       ` Martin Langhoff
2020-06-10 17:06       ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200610000358.GR6569@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=martin.langhoff@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).