I tried writing a simple difftool for this question - Verify that Git commit only moves lines - and it works ... fine I guess, but there is one problem.
When asking it to do a diff between two commits, like this:
git difftool -t OnlyMovedLines HEAD~1 HEAD
Then for each modified file, two temporary files gets created with the snapshots from each of the commits, and then the tool is invoked.
This, however, means that the tool is unable to report which file is actually being diffed, as the filenames could be things like this:
C:\Users\lasse\AppData\Local\Temp/Ol8Kc9_a.txt
C:\Users\lasse\AppData\Local\Temp/WtSX78_a.txt
So my question is this, is there any way for me to add more to the configuration in the .gitconfig file, or are there things like environment variables or whatnot, that can be used to tell the tool which file is actually being compared?
The .gitconfig file looks like this for this particular tool:
[difftool "OnlyMovedLines"]
cmd = 'D:\\path\\to\\netcoreapp3.1\\OnlyLinesMovedDiffTool.exe' $LOCAL $REMOTE