Giter VIP home page Giter VIP logo

imara-diff's People

Contributors

garyray-k avatar kirawi avatar pascalkuthe avatar tshepang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

imara-diff's Issues

Just had to say 'thanks' ๐Ÿ™

Just now I have integrated imara-diff into gitoxide, replacing similar for a stunning 2x speedup when running ein t h -l. Thanks to your work gitoxide can excel even with diff performance, a previously undercooked feature that I cobbled together quickly. With imara-diff I have the feeling that I can built on top of a crate that acknowledges git and sees it as baseline, along with the desire to improve on it. It's probably what I would have wanted to have in git-diff verbatim if there would have been enough time (butโ€ฆ I am also glad I didn't have to implement it myself ๐Ÿ˜…).

Thank you sooo much ๐Ÿ™

Crashes in Rust Nightly

Running the test with Miri using MIRIFLAGS="-Zmiri-disable-isolation" cargo +nightly miri test for this repo results in a SIGKILL.

running 5 tests
test tests::complex_diffs ... error: test failed, to rerun pass `--lib`

Caused by:
  process didn't exit successfully: `/usr/local/rustup/toolchains/nightly-aarch64-unknown-linux-gnu/bin/cargo-miri runner /data/target/miri/aarch64-unknown-linux-gnu/debug/deps/imara_diff-b916e6c16bd4f65d` (signal: 9, SIGKILL: kill)

This might have something to do with the issue reported in rust-lang/rust#112171.

Add convenience feature for word diff

Performing a word diff over a full file can be fairly slow on large files.
A better approach is to perform a line diff first and and then perform the word diff on the found changes.
While this is already possible with imara-diff is requires quite a bit of legwork and can be tricky to get right.
It would be nice if this could be included in the library directly.
This has multiple steps for an implementation:

  • Determine the output format. A different trait or force collecting into a Vec?
  • Implement a TokenSource for words
  • Implement a Sink that automatically computes a word diff
  • Potentially implement a heuristic to detect and ignore

The diff algorithm in git only operates on lines. It is worth looking into what exactly they use to produce a colored word diff from the line diff.
Perhaps a different algorithm is a better fit?

Opting out of token interning

Hey, thanks for making this crate. :)
Would it be possible to call diff without having to intern the input first? In my use case (character-wise diffing) interning doesn't seem necessary, as chars should be as cheap to compare as Tokens (that are just u32's under the hood) - and interning has it's non-trivial cost.

Thanks!

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.