• Patrick Steinhardt's avatar
    gitaly_client: Add ability to fetch remotes by URL · 962ee905
    Patrick Steinhardt authored
    When fetching remotes, we currently first create it and then fetch the
    created remote. This is an inefficient interface and awkward to use, as
    we have to assert that the remote exists each time we fetch. It's also
    vulnerable to races as we now depend on on-disk state of Gitaly.
    
    Some time ago, Gitaly has introduces a new `RemoteParams` field to the
    `FetchRemote()` RPC which enables callers to provide configuration of
    the remote directly instead of passing the previously created remote.
    As a first step towards switching to that function, this commit
    introduces two new parameters `url` and `refmap` to `fetch_remote()`
    which switch to this new behaviour if given.
    962ee905
repository.rb 34.8 KB