git: Handle buffer file path changes (#41944)

Update `GitStore.on_buffer_store_event` so that, when a
`BufferStoreEvent::BufferChangedFilePath` event is received, we check if
there's any diff state for the buffer and, if so, update it according to
the new file path, in case the file exists in the repository.

Closes #40499

Release Notes:

- Fixed issue with git diff tracking when updating a buffer's file from
an untracked to a tracked file
d896af2f15Dino committed on 11/10/2025, 6:19:08 PM· committed by GitHubparentc748b17
2 files changedLine totals unavailable