GitRepository.LocalPath is required and non-nullable, but a repository a hosting provider enumerates has never been cloned, so there is no real local path to report. Both providers work around this by inventing one under Environment.CurrentDirectory.
That has two consequences. The value depends on process-global mutable state, so the same remote repository yields a different record depending on when it was enumerated. And the providers need a containment guard (GitProvider.ToLocalRepositoryPath) purely to make the invented path safe, because the name comes from a remote API response.
A nullable LocalPath would let a provider say "not known", which is what is actually true, and would remove the reason the guard exists at all.
Breaking change, so it belongs in the next major rather than a patch.
Found during the Phase 5b final review (#80).
GitRepository.LocalPathisrequiredand non-nullable, but a repository a hosting provider enumerates has never been cloned, so there is no real local path to report. Both providers work around this by inventing one underEnvironment.CurrentDirectory.That has two consequences. The value depends on process-global mutable state, so the same remote repository yields a different record depending on when it was enumerated. And the providers need a containment guard (
GitProvider.ToLocalRepositoryPath) purely to make the invented path safe, because the name comes from a remote API response.A nullable
LocalPathwould let a provider say "not known", which is what is actually true, and would remove the reason the guard exists at all.Breaking change, so it belongs in the next major rather than a patch.
Found during the Phase 5b final review (#80).