git_ui: Fix visual optimistic staging bug for tree view (#48078)

Before this PR we would not show the placeholder for the parent folders
of a file entry inside the git tree view. This PR fixes that so it's
visually correct.

**Before**


https://github.com/user-attachments/assets/3d0988de-f43b-4b2d-8f90-c531316ab290

**After**


https://github.com/user-attachments/assets/e28f9eba-e301-4f9a-8647-7f1f2f12f87d

Release Notes:

- Git UI: Fix optimistic placeholder for folders in the three view
9101f0ffc9Remco Smits committed on 1/31/2026, 6:54:18 PM· committed by GitHubparent608cc99
1 file changedLine totals unavailable