Menu

OmniDiff in scripts: a changed file can still exit successfully
📰

OmniDiff in scripts: a changed file can still exit successfully

DEV Community: rust·Shivam Dwivedi·15 days ago
#iySb3uxA
#devtorust#devto#dev#exit#changed
Reading 0:00
15s threshold

I changed qty * 10 to qty * 12 , ran OmniDiff, and got exit code 0 .

The diff was there. The command had succeeded. Those are separate questions, and a script needs to know which one it’s asking. 🙂

OmniDiff 0.3.0 is a content-aware diff tool with a terminal viewer, plain-text output and JSON output. I tried its official release binary on a tiny Python fixture. Here’s the part I’d check before putting it in a build job.

Original diagram of the executed file checks. These are return codes, not a speed comparison.

Get a useful result without changing Git settings 🧪

Download and extract the matching binary from the 0.3.0 release , then make omnidiff available on your PATH . The release has builds for several platforms. I used the prebuilt binary; this walkthrough doesn’t require compiling Rust.

Save this as check_diff.py and run python3 check_diff.py .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.