Skip to content

storage: Introduce `GetRepoPathConfig`

Justin Tobler requested to merge jt-get-repo-path-config into master

Currently storage.Locator specifies both GetPath and GetRepoPath for fetching the path of a repository. The only difference between these two is that GetRepoPath also validates that the path to specified repository is a valid Git directory.

The semantics do not clearly indicate the difference between these mostly similar functions. Instead, this functionality can be consolidated and a configuration option added to toggle validation.

This change allows GetRepoPath to accept GetRepoPathOption arguments and introduces the WithRepositoryVerificationSkipped option. This option will skip the Git directory validation of the repository path.

Edited by Justin Tobler

Merge request reports