Classify bare repos by structure, not directory name (#263)
Drop the `lastPathComponent.hasSuffix(".git")` gate around the
HEAD/objects/refs trio check in `Repository.isGitRepository(at:)` so
bare repos whose directory name does not end in `.git` (e.g.
`myrepo-bare/`) classify correctly instead of falling through to a
folder. Matches git's own `is_git_directory()` heuristic. Also require
`HEAD` to be a regular file so a directory with three child dirs named
HEAD/objects/refs is not a false positive.
authored by