Rename OpenWorktree message to JoinWorktree

We'll repurpose the name 'OpenWorktree' for opening a local
worktree while signed in, and advertising the open status to
the worktree's collaborators.
This commit is contained in:
Max Brunsfeld
2021-09-16 12:57:19 -07:00
parent f0093974ee
commit 176ca9086e
4 changed files with 18 additions and 18 deletions
+7 -7
View File
@@ -117,7 +117,7 @@ impl Worktree {
cx: &mut AsyncAppContext,
) -> Result<ModelHandle<Self>> {
let response = rpc
.request(proto::OpenWorktree {
.request(proto::JoinWorktree {
worktree_id: id,
access_token,
})
@@ -127,18 +127,18 @@ impl Worktree {
}
async fn remote(
open_response: proto::OpenWorktreeResponse,
join_response: proto::JoinWorktreeResponse,
rpc: Arc<rpc::Client>,
languages: Arc<LanguageRegistry>,
cx: &mut AsyncAppContext,
) -> Result<ModelHandle<Self>> {
let worktree = open_response
let worktree = join_response
.worktree
.ok_or_else(|| anyhow!("empty worktree"))?;
let remote_id = open_response.worktree_id;
let replica_id = open_response.replica_id as ReplicaId;
let peers = open_response.peers;
let remote_id = join_response.worktree_id;
let replica_id = join_response.replica_id as ReplicaId;
let peers = join_response.peers;
let root_char_bag: CharBag = worktree
.root_name
.chars()
@@ -2780,7 +2780,7 @@ mod tests {
})
.await;
let remote = Worktree::remote(
proto::OpenWorktreeResponse {
proto::JoinWorktreeResponse {
worktree_id,
worktree: share_request.worktree,
replica_id: 1,