Avoid external diff execution when performing a git diff