gitserver: Support MigrateFrom in RepoUpdateRequest
Created by: indradhanush
Issue created from discussion #26416.
We would like to clone a repo from one gitserver instance to another as part of the repo migration to the new hashing scheme. The first step towards this will be to add the ability to send a clone request to gitserver with the config to clone from another gitserver instance instead of the upstream repo URL of the external service. To do this, add:
-
A MigrateFromstring attribute togitserver.protocol.RepoUpdateRequest -
A MigrateFromstring attribute togitserver.server.cloneOptions
And finally modify:
-
gitserver.server.handleRepoUpdateto parseprotocol.RepoUpdateRequest.MigrateFromand set it toserver.cloneOption.MigrateFromso that in a subsequent PR we can make the decision to clone from a gitserver if this attribute is a non zero string.