diff --git a/radicle-cli/src/commands/patch/checkout.rs b/radicle-cli/src/commands/patch/checkout.rs index 6148a6dc..b9489604 100644 --- a/radicle-cli/src/commands/patch/checkout.rs +++ b/radicle-cli/src/commands/patch/checkout.rs @@ -67,7 +67,7 @@ fn find_patch_commit<'a>( .find(|(_, o)| **o == patch_head) .ok_or(anyhow!("patch ref for {patch_head} not found in storage"))?; let remote_branch = git::refs::workdir::remote_branch( - &RefString::try_from(author.to_string())?, + &RefString::try_from(author.as_key().to_human())?, patch_branch, ); let url = git::Url::from(stored.id).with_namespace(*author); diff --git a/radicle-cli/src/commands/patch/update.rs b/radicle-cli/src/commands/patch/update.rs index 29cf972b..a5a6de94 100644 --- a/radicle-cli/src/commands/patch/update.rs +++ b/radicle-cli/src/commands/patch/update.rs @@ -96,6 +96,8 @@ pub fn run( let head_oid = branch_oid(&head_branch)?; let base_oid = workdir.merge_base(*target_oid, *head_oid)?; let message = message.get(REVISION_MSG); + let message = message.replace(REVISION_MSG.trim(), ""); + let message = message.trim(); let signer = term::signer(profile)?; let revision = patch.update(message, base_oid, *head_oid, &signer)?; diff --git a/radicle-cli/src/terminal.rs b/radicle-cli/src/terminal.rs index 06d38836..d387d2f6 100644 --- a/radicle-cli/src/terminal.rs +++ b/radicle-cli/src/terminal.rs @@ -88,11 +88,10 @@ where _ => {} }; eprintln!( - "{} {} {} {}", - Paint::red("=="), + "{} {} rad {}: {err}", + Paint::red(ERROR_PREFIX), Paint::red("Error:"), - Paint::red(format!("rad-{}:", help.name)), - Paint::red(err.to_string()), + help.name, ); if let Some(Error::WithHint { hint, .. }) = err.downcast_ref::() {