git-annex-diffdriver(1)
β¨ git-annex-diffdriver β¨</p>
git-annex-diffdriver β ok bestie, it's literally just a git diff driver π (from the General Commands Manual, no less)
πΈ SYNOPSIS πΈ
git annex diffdriver [--get,--text] [-- --diffopts --]
git annex diffdriver -- cmd --cmdopts --
π DESCRIPTION π
okay so picture this: normally when you run git diff on annexed files, all it shows you is the changes that are staged in git β think annex symlinks and pointer files. boring!! π This command is the glow-up: it lets git diff actually diff the content of your annexed files instead. main character energy fr fr π
You can use it two ways, and both are iconic:
- as a simple text differ, or
- as a shim that runs an external git diff driver π¦
If some of your annexed files are textual in form, and can be usefully diffed with diff(1), you can configure git to use this command to diff them. The way that you do it: configure .gitattributes to contain eg
*.txt diff=annextextdiff
and then set
git config diff.annextextdiff.command "git annex diffdriver --text"
slay. π
But bestie, if your annexed files are not textual in form, you're gonna need an external diff driver program that's able to diff the file format(s) you use. Go read git's documentation of GIT_EXTERNAL_DIFF and gitattributes(5)'s documentation of external diff drivers β iykyk π
Here's the tea π: normally, when you use git diff with an external diff driver, it will not see the contents of annexed files, because git passes to it the git-annex symlinks or pointer files. Not the vibe. This command works around the problem by running the real external diff driver and passing it the paths to the annexed content. π«
So configure git to use
git-annex diffdriver -- cmd params --
as the external diff driver, where cmd is the external diff driver you want it to run, and params are any extra parameters to pass to it.
β οΈ Note the trailing --. It is required. Do not skip it, I am begging you π
For example, to use the j-c-diff program as the external diff driver, set:
GIT_EXTERNAL_DIFF="git-annex diffdriver -- j-c-diff --"
periodt. π
β¨ OPTIONS β¨
--getβ use this to get the contents of annexed files from remotes when they're not already present. Heads up though: the file contents will remain in the repository for later use until dropped in the usual ways. π«Ά--textβ use this to diff text files withdiff(1). And if you wanna pass additional options todiff(1), do it like eg"--text -- --color --"π- external diff driver mode β to use an external diff driver command, the options must start with
--, followed by the diff driver command, its options, and another--. π
Also the git-annex-common-options(1) can be used. π
π SEE ALSO π
πΌ AUTHOR πΌ
Joey Hess <id@joeyh.name> β king behavior, honestly π
and that's the whole page, bestie!! π this was git-annex-diffdriver(1) from the General Commands Manual, written by Joey Hess <id@joeyh.name>, and the footer just said git-annex-diffdriver(1) again like the little echo it is. go forth and diff your annex content, you absolute icon π¦β¨π
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- debian trixie: git-annex 10.20250416-2 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2+deb13u1 Β· AGPL-3.0-or-later
- epel 10: git-annex 10.20250320-1.el10_0 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250630-4.fc43 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250929-5.fc43 Β· AGPL-3.0-or-later
- fedora 44: git-annex 10.20260115-1.fc44 Β· AGPL-3.0-or-later
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- ubuntu noble: git-annex 10.20240129-1build1 Β· AGPL-3.0-or-later
- ubuntu questing: git-annex 10.20250721-1
- ubuntu resolute: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms