I\'m trying to use vimdiff+dirdiff.vim to diff inside Vim multiple files versionned with Git.
For Mercurial, it is possible with mercurial extdiff extension.
It would be interesting to monitor the commits for the Vim module fugitive, because, starting with (git 1.7.11, June 2012), git now can diff directories (ie display all the files to be compared, before opening the difftool)
See "git difftool to give directory compare?"
So adding that feature to fugitive.vim would be an evolution from a file to file diff approach.
However, Zyx points out in the comment the limits of that approach:
All you need to get this working is:
git diff --name-statusandgit cat-file,nothing more (except for some
vimscriptcode).
And, unlikegit difftool, this works for any VCS with vcsdiffand vcscat-filesupport
Zyx mentions as an example of that file-byfile approach his project aurum:
My aurum has dirdiff-like functionality (
AuVimDiff fullopens a bunch of tabs withvimdiffview of files that have differences) and it never used any sort ofdifftoolsupport.
(See script aurum / autoload / aurum / vimdiff.vim)
Zyx adds:
it cannot be a good guide for a person that wants to add this functionality to fugitive:
Actualgit diff --name-statuscall is hidden inside the git driver in a function called bys:git.statusaccessed asrepo.functions.status(because mercurial useshg status -r rev1:rev2, nothg diff --name-statusand I find this rather logical).
Thus you have to traverse three levels of abstraction here (repository interface, shell commands wrapper and only then actual git call).
It is faster to write everything from scratch