Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
remote-helper: Fix refs advertisement for patches
Alexis Sellier committed 2 years ago
commit 885f4999dad83a9ca290567a2cbcecfa8ba64ee8
parent 0974a4a164666cc9d64aace1df996b34174aefcb
3 files changed +6 -3
modified radicle-cli/examples/workflow/6-pulling-contributor.md
@@ -23,7 +23,6 @@ Your branch is up to date with 'rad/master'.
$ git pull --all --ff
From rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji
   f2de534..f567f69  master     -> rad/master
-
   27857ec..f567f69  patches/50e29a111972f3b7d2123c5057de5bdf09bc7b1c -> rad/patches/50e29a111972f3b7d2123c5057de5bdf09bc7b1c
From rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
   f2de534..f567f69  master     -> alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi/master
```
modified radicle-remote-helper/src/list.rs
@@ -72,7 +72,11 @@ fn patch_refs<R: ReadRepository + cob::Store>(stored: &R) -> Result<(), Error> {
    let patches = radicle::cob::patch::Patches::open(stored)?;
    for patch in patches.all()? {
        let (id, patch) = patch?;
-
        println!("{} {}", patch.head(), git::refs::storage::patch(&id));
+
        let head = patch.head();
+

+
        if patch.is_open() && stored.commit(*head).is_ok() {
+
            println!("{} {}", patch.head(), git::refs::storage::patch(&id));
+
        }
    }
    Ok(())
}
modified radicle/src/storage.rs
@@ -391,7 +391,7 @@ pub trait ReadRepository: Sized {

    /// Get the [`git2::Commit`] found using its `oid`.
    ///
-
    /// Returns `None` if the commit did not exist.
+
    /// Returns `Err` if the commit did not exist.
    fn commit(&self, oid: Oid) -> Result<git2::Commit, git::ext::Error>;

    /// Perform a revision walk of a commit history starting from the given head.