https://github.com/daimaou92/difflore
figuring out text diffs from zero
https://github.com/daimaou92/difflore
diff learning-by-doing myers-algorithm rust rust-lang
Last synced: about 1 month ago
JSON representation
figuring out text diffs from zero
- Host: GitHub
- URL: https://github.com/daimaou92/difflore
- Owner: daimaou92
- License: mit
- Created: 2022-06-06T10:13:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-07T13:40:34.000Z (over 3 years ago)
- Last Synced: 2024-12-29T05:34:01.528Z (about 1 year ago)
- Topics: diff, learning-by-doing, myers-algorithm, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Learning text diffs [rust]
### Steps
1. `file1` and `file2` in `/` directory are taken as inputs
2. `file1` is treated as the original file. `file2` is treated as the new one.
3. Run the [Myers Diff algorithm](https://neil.fraser.name/writing/diff/myers.pdf)
on them using `cargo run --bin myers`
4. Every deleted line is printed begining with `- `
5. Prefix for additions is `+ ` and for identical lines its two blank spaces.
### Thanks
1. [Awesome explanation of Myer's Algo](https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm-part-1/)