Marc Herbert ec3428b48f tests: fix "gpatch --version" error message on mac (#235)
When we fail to find `gpatch`, don't say that we failed to find `patch`.

Cosmetic fix to commit 1254f146f8 ("tests: validate "patch" and "ed"
commands once, print meaningful messages (#226)")

This is an extremely minor fix because the error message already printed
"gpatch validation failed, no such file or directory" even before this
commit.

Signed-off-by: Marc Herbert <Marc.Herbert@gmail.com>
2026-06-03 14:11:51 +02:00
2026-03-07 14:55:10 +01:00
2026-05-14 09:41:36 +02:00
2026-06-03 14:11:29 +02:00
2024-01-24 09:31:09 +01:00
2026-03-08 21:53:27 +01:00
2024-01-22 18:51:27 +01:00
2026-05-09 16:44:14 +02:00

Crates.io Discord License dependency status CodSpeed

CodeCov

The goal of this package is to be a drop-in replacement for the diffutils commands (diff, cmp, diff3, sdiff) in Rust.

Based on the incomplete diff generator in https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs, and made to be compatible with GNU's diff and patch tools.

Installation

Ensure you have Rust installed on your system. You can install Rust through rustup.

Clone the repository and build the project using Cargo:

git clone https://github.com/uutils/diffutils.git
cd diffutils
cargo build --release

Example


cat <<EOF >fruits_old.txt
Apple
Banana
Cherry
EOF

cat <<EOF >fruits_new.txt
Apple
Fig
Cherry
EOF

$ cargo run -- -u fruits_old.txt fruits_new.txt
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/diffutils -u fruits_old.txt fruits_new.txt`
--- fruits_old.txt
+++ fruits_new.txt
@@ -1,3 +1,3 @@
 Apple
-Banana
+Fig
 Cherry

License

This project is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.

S
Description
No description provided
Readme 1.1 MiB
Languages
Rust 96.3%
Shell 1.9%
Python 1.8%