[RFC] Avoid exposing unknown git repositories

The discussion here went quiet for the past week.
Considering the current proposal doesn’t change the behavior as the original one, I believe the PR is ready to be merged.
I plan to merge it later today if nobody objects.