cli: Additional fixes in the merge process

This commit is contained in:
Alexis Sellier 2023-04-03 15:52:31 +02:00
parent b6fa4a4b2a
commit 9e50d9053a
No known key found for this signature in database
3 changed files with 6 additions and 5 deletions

View File

@ -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);

View File

@ -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)?;

View File

@ -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::<Error>() {