Skip to content

Commit ac91e48

Browse files
committed
difftool: implement the functionality in the builtin
This patch gives life to the skeleton added in the previous patch. The motivation for converting the difftool is that Perl scripts are not at all native on Windows, and that `git difftool` therefore is pretty slow on that platform, when there is no good reason for it to be slow. In addition, Perl does not really have access to Git's internals. That means that any script will always have to jump through unnecessary hoops. The current version of the builtin difftool does not, however, make full use of the internals but instead chooses to spawn a couple of Git processes, still, to make for an easier conversion. There remains a lot of room for improvement, left for a later date. Note: to play it safe, the original difftool is still called unless the config setting difftool.useBuiltin is set to true. The reason: this new, experimental, builtin difftool will be shipped as part of Git for Windows v2.11.0, to allow for easier large-scale testing, but of course as an opt-in feature. Sadly, the speedup is more noticable on Linux than on Windows: a quick test shows that t7800-difftool.sh runs in (2.183s/0.052s/0.108s) (real/user/sys) in a Linux VM, down from (6.529s/3.112s/0.644s), while on Windows, it is (36.064s/2.730s/7.194s), down from (47.637s/2.407s/6.863s). The culprit is most likely the overhead incurred from *still* having to shell out to mergetool-lib.sh and difftool--helper.sh. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 3a10fd7 commit ac91e48

File tree

1 file changed

+669
-1
lines changed

1 file changed

+669
-1
lines changed

0 commit comments

Comments
 (0)