[racket-dev] "warning: CRLF will be replaced by LF in {src/worksp/README src/worksp/gracket/gracket.rc src/worksp/racket/racket.rc}" ?

From: Greg Hendershott (greghendershott at gmail.com)
Date: Tue Dec 11 14:38:53 EST 2012

Turns out a .gitattributes snuck into my home directory (as a result
of experimenting with syncing my dotfiles to GitHub).

The ~/.gitattributes contained

    # Automatically normalize line endings for all text-based files
    * text=auto

which caused this regardless of my ~.gitconfig core.autocrlf setting.

If anyone wants to bake a cake, I have some egg. You don't want it
fresh off my face? Oh, OK.

On Tue, Dec 11, 2012 at 1:59 PM, Nick Sivo <nicksivo at gmail.com> wrote:
> I've had success both with the settings and normalization process
> described here:
>
> https://help.github.com/articles/dealing-with-line-endings
>
> It comes up a lot since I work on Windows, Mac, and FreeBSD pretty regularly.
>
> -Nick
>
> On Tue, Dec 11, 2012 at 8:08 AM, Eli Barzilay <eli at barzilay.org> wrote:
>> Yesterday, Matthew Flatt wrote:
>>> I've probably mangled the line endings of those file as I wrestled
>>> with Windows, git, and MinGW.
>>
>> All three files look file -- they're using CRLF.
>>
>> There are some very confusing problems with some git settings on
>> windows which resulted in some very long discussions about it.  IIRC,
>> the best thing to do is to avoid any kind of line ending conversion,
>> and use an editor that respects LF files.
>>
>>
>>> I'm not sure what you should do right now, but I'll look into fixing
>>> the files, and hopefully that will just fix things on your machine.
>>>
>>> At Mon, 10 Dec 2012 12:35:29 -0500, Greg Hendershott wrote:
>>> > Preface: I'm sorry if this is a really basic question, but I'm new to
>>> > this Git workflow, so I'm cautious because I don't want to cause a
>>> > nuisance with some future pull request.
>>> >
>>> > I just did a `git fetch` of the upstream PLT master, then a `git
>>> > merge` into my master.
>>> >
>>> > greg at mbp in ~/src/plt/racket on master
>>> > $ git fetch upstream
>>> > remote: Counting objects: 327, done.
>>> > remote: Compressing objects: 100% (72/72), done.
>>> > remote: Total 216 (delta 174), reused 183 (delta 142)
>>> > Receiving objects: 100% (216/216), 40.89 KiB, done.
>>> > Resolving deltas: 100% (174/174), completed with 102 local objects.
>>> > From github.com:plt/racket
>>> >    0dfcf63..6aa6dc0  master     -> upstream/master
>>> >
>>> > greg at mbp in ~/src/plt/racket on master
>>> > $ git merge upstream/master
>>> > Merge made by the 'recursive' strategy.
>>> > warning: CRLF will be replaced by LF in src/worksp/README.
>>> > The file will have its original line endings in your working directory.
>>> > warning: CRLF will be replaced by LF in src/worksp/gracket/gracket.rc.
>>> > The file will have its original line endings in your working directory.
>>> > warning: CRLF will be replaced by LF in src/worksp/racket/racket.rc.
>>> > The file will have its original line endings in your working directory.
>>> >  collects/compiler/private/xform.rkt                |   54 +-
>>> >  collects/math/private/bigfloat/gmp.rkt             |    7 +-
>>> >  collects/math/private/bigfloat/mpfr.rkt            |   34 +-
>>> >  ... etc. ...
>>> >
>>> >
>>> > At the moment, git tells me I have local uncommitted changes:
>>> >
>>> > greg at mbp in ~/src/plt/racket on master*
>>> > $ git status
>>> > # On branch master
>>> > # Your branch is ahead of 'origin/master' by 22 commits.
>>> > #
>>> > # Changes not staged for commit:
>>> > #   (use "git add <file>..." to update what will be committed)
>>> > #   (use "git checkout -- <file>..." to discard changes in working directory)
>>> > #
>>> > #   modified:   src/worksp/README
>>> > #   modified:   src/worksp/gracket/gracket.rc
>>> > #   modified:   src/worksp/racket/racket.rc
>>> > #
>>> > no changes added to commit (use "git add" and/or "git commit -a")
>>> >
>>> >
>>> > 1. What is the correct thing for me to do?  Add/commit these to my
>>> > local master, or something else?
>>> >
>>> > 2. I double-checked with `git config -l`, and I do _not_ have
>>> > core.autocrlf enabled. Is that correct or instead should I enable it?
>>> >
>>> > Thank you.
>>> > _________________________
>>> >   Racket Developers list:
>>> >   http://lists.racket-lang.org/dev
>>> _________________________
>>>   Racket Developers list:
>>>   http://lists.racket-lang.org/dev
>>
>> --
>>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>>                     http://barzilay.org/                   Maze is Life!
>> _________________________
>>   Racket Developers list:
>>   http://lists.racket-lang.org/dev
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev

Posted on the dev mailing list.