Skip to main content

@ossl-dev/differens-git

This package shells out to the git binary to collect file pairs and registers Differens as a git diff driver. It returns GitDiffInput[] pairs ready for the tier pipeline. Install:

Exports

How the diff driver works

Git invokes a registered driver with seven arguments: path old-file old-hex old-mode new-file new-hex new-mode. The two file arguments are temporaries that git wrote the blobs to, and they get generated names without extensions. The tier must be picked from path. Classifying by temp name would find no extension and line-diff everything. Both files are handled in one process. The CLI sees DRIVER_FLAG and reads the blobs through a single git cat-file --batch stream, instead of spawning one git show per file per side.

Usage

Removing the driver

There is no uninstall helper yet. Remove the config manually: