How to build a `Git diff` driver
Something I've been meaning to write about since November 2024 is how to create an external command for diffing between files with git diff .
I thought I'd use this as an opportunity for blogging about how this works, as well as adding a separate for oasdiff as a diff driver.
Although many tools would work out-of-the-box if they expect to be run as tool [before] [after] , git diff passes 7 arguments to the external tool it's calling.
# 3: SHA-1 hash of the "before" file .
It can also be useful to see if the environment variable GIT_PAGER_IN_USE is set, if you'd like your command to be able to handle regular arguments and the git diff arguments.
1 час назад @ jvt.me
infomate
