Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
node: set identity head after fetch
Fintan Halpenny committed 3 years ago
commit a629f91b1e4fc249ce2a41e82eb2a2f9a716fd79
parent a32101ab75c10defdd3f8854f44a6c362bbf3ccd
2 files changed +10 -0
modified radicle-node/src/tests/e2e.rs
@@ -326,6 +326,14 @@ fn test_clone() {
        .unwrap();

    assert_eq!(oid, *canonical);
+

+
    // Make sure that bob has refs/rad/id set
+
    assert!(bob
+
        .storage
+
        .repository(acme)
+
        .unwrap()
+
        .identity_head()
+
        .is_ok());
}

#[test]
modified radicle-node/src/worker.rs
@@ -328,6 +328,8 @@ impl<G: Signer + Ecdh + 'static> Worker<G> {
            log::debug!(target: "worker", "Fetch for {} exited successfully", rid);
            let head = repo.set_head()?;
            log::debug!(target: "worker", "Head for {} set to {head}", rid);
+
            let head = repo.set_identity_head()?;
+
            log::debug!(target: "worker", "'refs/rad/id' for {} set to {head}", rid);
            Ok(vec![])
        } else {
            log::error!(target: "worker", "Fetch for {} failed", rid);