Implement find subprojects and do not recurse to a non-bare repository for src-expose serve
Created by: joshuabezaleel
Fixes: #8636
If a particular directory is a repository, proceed to configure and add to gitDirs
.
If a particular repository is a bare repository, proceed to recurse. If it is a non-bare repository, skip it so that it won't recurse.
This is my first time contributing to Sourcegraph and I am still learning Go so I am really sorry beforehand if I got several things wrong. Looking forward to the review!