preserve ref name in annotated commit

This commit is contained in:
Stephan Dilly 2021-05-12 09:13:28 +02:00
parent b5327a65c1
commit a073e0ac02

View file

@ -45,9 +45,8 @@ pub fn merge_branch(repo_path: &str, branch: &str) -> Result<()> {
let branch = repo.find_branch(branch, BranchType::Local)?;
let id = branch.into_reference().peel_to_commit()?;
let annotated = repo.find_annotated_commit(id.id())?;
let annotated =
repo.reference_to_annotated_commit(&branch.into_reference())?;
let (analysis, _) = repo.merge_analysis(&[&annotated])?;