Update index while creating file in git clone.
Merge pull request #1684 from dart-lang/optimize_clone

Update index while creating file in git clone.