git: Fix panic in `git2` due to empty repo paths (#42304)

Fixes ZED-1VR

Release Notes:

- Fixed sporadic panic in git features
0149de4b54Lukas Wirth committed on 11/10/2025, 9:27:51 AM· committed by GitHubparent359160c
13 files changedLine totals unavailable