Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: Display correct merge author in rad patch show output
Merged did:key:z6MkkfM3...sVz5 opened 2 years ago
1 file changed +5 -5 b495358c 0a78b9cc
modified radicle-cli/src/terminal/patch/timeline.rs
@@ -81,12 +81,12 @@ impl<'a> Opened<'a> {
                },
            )
        }));
-
        updates.extend(patch.merges().filter_map(|(_, merge)| {
+
        updates.extend(patch.merges().filter_map(|(nid, merge)| {
            if merge.revision == root {
                Some((
                    merge.timestamp,
                    Update::Merged {
-
                        author: Author::new(&revision.author().id, profile),
+
                        author: Author::new(nid, profile),
                        merge: merge.clone(),
                    },
                ))
@@ -157,7 +157,7 @@ enum RevisionEntry<'a> {

impl<'a> RevisionEntry<'a> {
    fn from_revision(
-
        patch: &Patch,
+
        patch: &'a Patch,
        id: RevisionId,
        revision: &'a Revision,
        profile: &Profile,
@@ -171,12 +171,12 @@ impl<'a> RevisionEntry<'a> {
                },
            )
        }));
-
        updates.extend(patch.merges().filter_map(|(_, merge)| {
+
        updates.extend(patch.merges().filter_map(|(nid, merge)| {
            if merge.revision == id {
                Some((
                    merge.timestamp,
                    Update::Merged {
-
                        author: Author::new(&revision.author().id, profile),
+
                        author: Author::new(nid, profile),
                        merge: merge.clone(),
                    },
                ))