Please describe the problem.
The git-annex diffdriver fails to create a diff for renamed annexed files.
What steps will reproduce the problem?
mkdir repo
cd repo/
git init
git annex init
echo '*.txt diff=annexedtext' >> .gitattributes
git annex add .
git commit -m 'commit'
git config diff.annexedtext.command 'git annex diffdriver --text'
echo test > test.txt
git annex add .
git commit -m 'commit'
git mv test.txt moved-test.txt
git commit -m 'commit'
git diff HEAD~1..HEAD
What version of git-annex are you using? On what operating system?
git-annex version: 10.20260601-gd153453dde35bb4c90443996bf4af054ef04a6a9
build flags: Assistant Webapp Inotify DBus DesktopNotify TorrentParser MagicMime Benchmark Feeds Testsuite S3 WebDAV Servant OsPath
dependency versions: aws-0.24.4 bloomfilter-2.0.1.3 crypton-1.0.4 DAV-1.3.4 feed-1.3.2.1 ghc-9.10.3 http-client-0.7.19 torrent-10000.1.3 uuid-1.3.16 yesod-1.6.2.1
key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 BLAKE2B256E BLAKE2B256 BLAKE2B512E BLAKE2B512 BLAKE2B160E BLAKE2B160 BLAKE2B224E BLAKE2B224 BLAKE2B384E BLAKE2B384 BLAKE2BP512E BLAKE2BP512 BLAKE2S256E BLAKE2S256 BLAKE2S160E BLAKE2S160 BLAKE2S224E BLAKE2S224 BLAKE2SP256E BLAKE2SP256 BLAKE2SP224E BLAKE2SP224 SHA1E SHA1 MD5E MD5 WORM URL GITBUNDLE GITMANIFEST VURL X*
remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg rclone hook external compute mask
operating system: linux x86_64
supported repository versions: 8 9 10
upgrade supported from repository versions: 0 1 2 3 4 5 6 7 8 9 10
local repository version: 10
from conda-forge. I'll retry with the latest version once the update hits the repositories... Same issue with 10.20260717-g0c917920c80ab1e8cc3d8f5886537708949e1659.
Please provide any additional information below.
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
$ mkdir repo
$ cd repo/
$ git init
Leeres Git-Repository in /home/icg149/Playground/repo/.git/ initialisiert
$ git annex init
init ok
(recording state in git...)
$ echo '*.txt diff=annexedtext' >> .gitattributes
$ git annex add .
add .gitattributes (dotfile; adding content to git repository) ok
(recording state in git...)
$ git commit -m 'commit'
[main (Root-Commit) ad61e2d] commit
1 file changed, 1 insertion(+)
create mode 100644 .gitattributes
$ git config diff.annexedtext.command 'git annex diffdriver --text'
$ echo test > test.txt
$ git annex add .
add test.txt
ok
(recording state in git...)
$ git commit -m 'commit'
[main 5ae489e] commit
1 file changed, 1 insertion(+)
create mode 120000 test.txt
$ git mv test.txt moved-test.txt
$ git commit -m 'commit'
[main 34045af] commit
1 file changed, 0 insertions(+), 0 deletions(-)
rename test.txt => moved-test.txt (100%)
$ git diff HEAD~1..HEAD
git-annex: Unexpected input: test.txt /tmp/git-blob-bAAkbd/test.txt e7eabeaf9f3ed585eea5b4b687fb09b951899559 120000 /tmp/git-blob-zNUKeQ/moved-test.txt e7eabeaf9f3ed585eea5b4b687fb09b951899559 120000 moved-test.txt similarity index 100%
rename from test.txt
rename to moved-test.txt
Schwerwiegend: externes Diff-Programm unerwartet beendet, angehalten bei test.txt
[ble: exit 128]
$ git show
commit 34045afbd0015edd52d19bb7973be6c0cb56309b (HEAD -> main)
Author: Matthias Riße <m.risse@fz-juelich.de>
Date: Thu Aug 27 17:32:30 2026 +0200
commit
diff --git a/test.txt b/moved-test.txt
similarity index 100%
rename from test.txt
rename to moved-test.txt
# End of transcript or log.
git's not behaving as it's documented to; the diffdriver is documented to take 7 parameters the same as
GIT_EXTERNAL_DIFFdoes, but here it's passing an 8th parameter with some textual description of the move.This does not seem to be new behavior, it goes back to 2010 or so.
Anyway, it will be easy to make git-annex support this, since it can simply ignore the 8th parameter.