A practical guide on building a custom `git diff` driver — an external command that git delegates diffing to. Covers the 7 arguments git passes to the external tool (filename, before/after paths, SHA-1 hashes, file modes), how special cases like file creation and deletion are handled using `/dev/null`, and includes a working bash script example using `oasdiff` to produce human-readable changelogs for OpenAPI spec diffs.

4m read timeFrom jvt.me
Post cover image
Table of contents
What arguments do we need to handle?Example with oasdiff

Sort: