git: Fix race condition loading project diff (cherry-pick #25992) (#25999)

gcp-cherry-pick-bot[bot] and Conrad Irwin created

Cherry-picked git: Fix race condition loading project diff (#25992)

Release Notes:

- git: Fixed a race condition where some files would be missing from
project diff

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Change summary

0 files changed

Detailed changes