#diff #unified #cargo #gnu #format #generator #patch

bin+lib unified-diff

An implementation of the GNU unified diff format

5 releases

0.2.1 Feb 25, 2021
0.2.0 Feb 25, 2021
0.1.2 Feb 25, 2021
0.1.1 Feb 24, 2021
0.1.0 Feb 24, 2021

#1006 in Development tools

Download history 6499/week @ 2024-07-19 5972/week @ 2024-07-26 6245/week @ 2024-08-02 6137/week @ 2024-08-09 5360/week @ 2024-08-16 6219/week @ 2024-08-23 6303/week @ 2024-08-30 6549/week @ 2024-09-06 5590/week @ 2024-09-13 6439/week @ 2024-09-20 5852/week @ 2024-09-27 6052/week @ 2024-10-04 6162/week @ 2024-10-11 6688/week @ 2024-10-18 7180/week @ 2024-10-25 6685/week @ 2024-11-01

27,673 downloads per month
Used in 3 crates

MIT/Apache

40KB
704 lines

A GNU unified diff generator. Oracle tested against GNU patch 2.7.6

Based on the incomplete diff generator in https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs, but it implements a different format.

~/unified-diff$ cargo run Cargo.lock Cargo.toml 
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/unified-diff Cargo.lock Cargo.toml`
--- Cargo.lock	
+++ Cargo.toml	
@@ -1,14 +1,14 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-[[package]]
-name = "diff"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499"
-
-[[package]]
+[package]
 name = "unified-diff"
 version = "0.1.0"
-dependencies = [
- "diff",
+authors = [
+    "Michael Howell <michael@notriddle.com>",
+    "The Rust Project Developers"
 ]
+edition = "2018"
+
+[[bin]]
+name = "unified-diff"
+
+[dependencies]
+diff = "0.1.10"
~/unified-diff$ rustup override set nightly
~/unified-diff$ cargo fuzz run fuzz_patch

Dependencies

~45KB