Optimize git add performance.
Merge pull request #2543 from dart-lang/optimize_git_add

Optimize git add performance.