cli: Additional fixes in the merge process
This commit is contained in:
parent
b6fa4a4b2a
commit
9e50d9053a
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)?;
|
||||
|
||||
|
|
|
|||
|
|
@ -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>() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue