Code Monkey home page Code Monkey logo

Comments (11)

kusma avatar kusma commented on June 16, 2024

There has been some upstream-work on this:

http://mid.gmane.org/20100904082509.GC10140@burratino

The problem seems to be that NATIVE_CRLF is only set for the MSVC build, and not the MinGW-build. The patch there doesn't seem to have been picked up yet, though. And as things are now, the hunk needs to be against config.mak.uname instead of Makefile.

from git.

sschuberth avatar sschuberth commented on June 16, 2024

Seems like this patch has now been applied upstream (though I do not see the changes yet in any of the upstream repositories). I'm leaving this open until we get the fix with the next rebasing merge of upstream.

from git.

taspeotis avatar taspeotis commented on June 16, 2024

@sschuberth I think it's this commit.

from git.

sschuberth avatar sschuberth commented on June 16, 2024

@taspeotis Right, that is the upstream commit which will be part of upstream Git 1.8.3, but we do not have that commit in our Windows fork yet.

from git.

sschuberth avatar sschuberth commented on June 16, 2024

Odd, I still see this issue in Git for Windows 1.8.3 although we now have NATIVE_CRLF = YesPlease in config.mak.uname for the MINGW build.

from git.

patthoyts avatar patthoyts commented on June 16, 2024

Ah - I noticed this during testing 1.8.3. I have a branch on github called pt/native-crlf where I actually push that flag to the compiler so it can have an effect. However, it introduces a few new failures in the test suite and I elected not to include that in the release. I guess making it a pull req might tie it into this bug somehow.

from git.

kusma avatar kusma commented on June 16, 2024

Fixed on master.

from git.

ctaggart avatar ctaggart commented on June 16, 2024

I think that instead of these code changes, it would be better to change the docs to read:

This ensures that all files that git considers to be the text will have normalized (LF) line endings in the repository. If core.autocrlf=true, core.eol will be used to normalize the files in your working directory. core.eol defaults to native line endings for your platform.

I blogged about this just now.

from git.

kusma avatar kusma commented on June 16, 2024

Without the code-changes, that last sentence would be wrong.

from git.

ctaggart avatar ctaggart commented on June 16, 2024

True, but the sentence before it isn't correct with the changes. I think it would be best if the spec was clarified what the behavior should be. I think it would be best if the working directory matched what is in the repository by default.

image

I did a bunch of testing a filled a spreadsheet full of tests.

from git.

sschuberth avatar sschuberth commented on June 16, 2024

I think it would be best if the working directory matched what is in the repository by default.

If that we the case, Windows users would commit new files with CRLF by default, and Linux users would commit new files with LF by default. That's certainly not a good idea for a cross-platform project on which developers from multiple host OSes work.

Anyway, the discussion is going a bit off-topic here. There original issue is resolved, and Git for Windows now works as currently specified. If you want to discuss whether the current specification makes sense, please take that discussion to the upstream Git mailing list.

from git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.