Code Monkey home page Code Monkey logo

Comments (3)

mbargull avatar mbargull commented on August 25, 2024 1

conda-forge/emacs-feedstock#80 (comment) :

We might be able to do either

*.path -text
*.diff -text

or

*.path binary diff
*.diff binary diff

. IDK which one would work/be preferred.

Looking at https://github.com/git/git/blob/v2.43.0/attr.c#L662 it seems we have binary defined as

[attr]binary -diff -merge -text

. So,

*.path -merge -text
*.diff -merge -text

would probably suffice to address the reported issue while still retaining the desired behavior with Git not break source line ending depending on the users' configurations.

from conda-smithy.

jakirkham avatar jakirkham commented on August 25, 2024

Maybe we can try one of these changes in a PR?

IIRC the line ending issue was tricky to get right depending on whether the user was on UNIX or Windows also depending on whether the patch/source code was written on UNIX or Windows. So we probably want to test all 4 cases to make sure that things behave as intended

from conda-smithy.

mbargull avatar mbargull commented on August 25, 2024

Maybe we can try one of these changes in a PR?

Yes, it would be nice if someone could try it out.

IIRC the line ending issue was tricky to get right depending on whether the user was on UNIX or Windows also depending on whether the patch/source code was written on UNIX or Windows.

Yes, depending on the users' Git settings and platforms they use things can break easily.
A good example to test things out for would be python-feedstock since we do have patches for files with different line endings in there.

So we probably want to test all 4 cases to make sure that things behave as intended

No, we'd only need to test the

*.patch -merge -text
*.diff -merge -text

case.
binary is just an alias for -diff -merge -text.
So, the minimal change to get diff to display contents of *.patch/*.diff without risking further issues is just to remove the -diff part of binary.
See https://git-scm.com/docs/gitattributes/2.43.0 for details (search for -diff/-text).

from conda-smithy.

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.