return clone URL for Gitolite repositories
Created by: beyang
What I've learned:
• disableAutoGitUpdates
doesn't affect the behavior of navigating directly to a repo to get it to clone
• The need for a clone URL to be set the first time gitserver clones a repository is documented in the code, but it's unclear where this clone URL actually comes from. Perhaps it would be useful for repo-updater to expose this and serve as the source of truth for such repository metadata? If that shouldn't be repo-updater, what should it be?
• Three code paths that might require a new repo to be cloned to gitserver are (1) repo-updater loop, (2) direct user navigation to a repo page, (3) triggering a repo-update by the $REPO/-/refresh
endpoint. Any others we might have to cover?
• Maybe it's worth changing the interface of EnqueueRepoUpdate
(https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/pkg/repoupdater/client.go#L145:0) to make it more explicit when the expectation is that a repo is cloned if it doesn't exist already. The current behavior of needing to set Repo.URL
is a bit hidden.
Fixes #3336 (closed)