4d37c4d5 fix(core): defer to git wherever the config parser cannot match it
The `.git/config` fast path answered confidently in four cases where git
answers differently, and its result feeds both the shared cache directory
and the repository name sent to Nx Cloud onboarding.
Git ends a value at an unquoted `#`/`;` and honours `\` escapes, so
`url = git@github.com:acme/app.git # mirror` parsed as the slug
`acme/app.git # mirror`. It also resolves `[url] insteadOf` before
reporting a remote, so a cross-host rewrite reported the mirror rather
than the real host, which silently disabled the GitHub checks in
`performance-report` and `connect-to-nx-cloud`. Both now hand the file to
git, matching the existing `include`/`includeIf` behaviour.
`locateGitDir` accepted any directory named `.git`, where git requires a
repository: a `.git` holding only a config file, planted in a writable
ancestor such as `/tmp`, decided the identity of every workspace beneath
it. It now checks for `HEAD` and `objects` first.
Reading the config blind also followed a symlink out of the repository,
and would have blocked forever on a FIFO -- this resolves at module scope
of `cache-directory.ts`, so every command in that workspace would hang
before printing anything. An `lstat` for a regular file covers both.
Every case degrades to spawning git rather than to a wrong answer.