InferTrackedKind was called before installTrackedRepoImpl's IsGit()
guard, causing --track with local paths to attempt a clone with an
empty URL instead of returning the correct error message.
Add an early IsGit() check so non-git sources fail with the expected
'--track requires a git repository source' error.