When scanning for repos rely on each '*.git' folder to be a git repo

'*.git' path segments are not allowed in project names anymore.
Assuming that only Gerrit creates folders in the git directory this
means that we can now rely on each '*.git' folder to be a git
repository and we do not need to inspect the content of that folder by
FileKey.isGitRepository(...). This should improve the performance of
scanning the file system for git repositories as now we only do a
check on the name and before we checked the existence of 'objects' and
'refs', and if there was a valid HEAD.
There is no protection against an admin that manually creates "*.git"
folders in the git directory that are not valid git repositories.

Change-Id: If394d5a485f8079bbe76b0822e64820b2d1d600e
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
1 file changed