node: Implement project checkout

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2022-09-13 10:16:05 +02:00
parent 09265eb3da
commit 4e9b60dee0
6 changed files with 154 additions and 23 deletions
+2
View File
@@ -58,6 +58,7 @@ impl ReadStorage for Storage {
if let Some(doc) = repo.identity(local)? {
let remotes = repo.remotes()?.collect::<Result<_, _>>()?;
let path = repo.path().to_path_buf();
// TODO: We should check that there is at least one remote, which is
// the one of the local user, otherwise it means the project is in
@@ -67,6 +68,7 @@ impl ReadStorage for Storage {
id: id.clone(),
doc,
remotes,
path,
}))
} else {
Ok(None)