Git Product home page Git Product logo

Comments (5)

schachmat avatar schachmat commented on August 14, 2024

Would you accept a pull request to fix this?

from go-diff.

keegancsmith avatar keegancsmith commented on August 14, 2024

Thanks for the proposal. I think we would. It seems like the set of inputs we understand will only increase + the empty diff makes sense. @eseliger @mrnugget thoughts? Any concerns around the nil time param?

from go-diff.

eseliger avatar eseliger commented on August 14, 2024

Don't think so, we should probably make sure we do proper nil checks in our codebase, but that shouldn't affect work in this repository.
I couldn't find any resources by a quick google search that defined this behavior, and I am struggling to understand what it actually means. So if it's only in source_a, that basically means deleted, right? And the other way around, that means it's created?
If so, I would have expected the expected result you posted would be [2].NewName: "source_b/file_3.txt and [2].OrigName: nil, so I must be missing something :) Can you clarify how the "Only in ..." is different from deleted/created?

from go-diff.

sofiia-tesliuk avatar sofiia-tesliuk commented on August 14, 2024

@eseliger yes, you are right :) It mostly clarifies deleted/created files (except maybe files that actually have been renamed, but this couldn't be handled, as they will be marked as deleted with originName and created with NewName). It will just require an extra step for checking whether source_a should be marked as OrigSource or NewSource.

from go-diff.

mrnugget avatar mrnugget commented on August 14, 2024

Sounds like it's another way to express deleted/created in diffs and supporting that would just be additional functionality that would have no effect on the existing code. If so, yeah, I think we should accept a PR :)

from go-diff.

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.