The Git and OCI clients have their own methods that run before actually performing a fetch operation (named cloneRepo and createRepository respectively). For consistency between clients, and similar to the PreparePush method for the Push operation, we should implement a PrepareFetch method with the following signature:
PrepareFetch(url *netutil.URL, auth *netutil.BasicAuth, opts *options.Options) error
Consequently, the top level Fetch function must be updated to call PrepareFetch before it calls the specialized client's Fetch method.
The Git and OCI clients have their own methods that run before actually performing a fetch operation (named
cloneRepoandcreateRepositoryrespectively). For consistency between clients, and similar to thePreparePushmethod for thePushoperation, we should implement aPrepareFetchmethod with the following signature:Consequently, the top level
Fetchfunction must be updated to callPrepareFetchbefore it calls the specialized client'sFetchmethod.