Cargo.lock 🔗
@@ -5652,6 +5652,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client",
+ "clock",
"gpui",
"language",
"log",
Antonio Scandurra created
Cargo.lock | 1 +
crates/project/src/project.rs | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
@@ -5652,6 +5652,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client",
+ "clock",
"gpui",
"language",
"log",
@@ -130,6 +130,27 @@ impl Project {
} else {
None
};
+
+ if let Some(project_id) = remote_id {
+ let mut registrations = Vec::new();
+ this.read_with(&cx, |this, cx| {
+ for worktree in &this.worktrees {
+ let worktree_id = worktree.id() as u64;
+ let worktree = worktree.read(cx).as_local().unwrap();
+ registrations.push(rpc.request(
+ proto::RegisterWorktree {
+ project_id,
+ worktree_id,
+ root_name: worktree.root_name().to_string(),
+ authorized_logins: worktree.authorized_logins(),
+ },
+ ));
+ }
+ });
+ for registration in registrations {
+ registration.await?;
+ }
+ }
this.update(&mut cx, |this, cx| this.set_remote_id(remote_id, cx));
}
}