File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
crates/gitbutler-branch-actions/src Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11use crate :: stack:: branch_integrated;
22use crate :: { r#virtual:: IsCommitIntegrated , BranchManagerExt , VirtualBranchesExt as _} ;
3- use anyhow:: { anyhow, bail, Result } ;
3+ use anyhow:: { anyhow, bail, Context , Result } ;
44use gitbutler_cherry_pick:: RepositoryExt ;
55use gitbutler_command_context:: CommandContext ;
66use gitbutler_commit:: commit_ext:: CommitExt as _;
@@ -561,13 +561,18 @@ fn compute_resolutions(
561561 // then rebase the tree ontop of that. If the tree ends
562562 // up conflicted, commit the tree.
563563 let target_commit = repository. find_commit ( branch_stack. head ( ) ) ?;
564+ let top_branch = branch_stack. heads . last ( ) . context ( "top branch not found" ) ?;
565+
566+ // These two go into the merge commit message.
567+ let incoming_branch_name = target. branch . fullname ( ) ;
568+ let target_branch_name = & top_branch. name ;
564569
565570 let new_head = gitbutler_merge_commits (
566571 repository,
567572 target_commit,
568573 new_target. clone ( ) ,
569- & branch_stack . name ,
570- & target . branch . to_string ( ) ,
574+ target_branch_name ,
575+ & incoming_branch_name ,
571576 ) ?;
572577
573578 // Get the updated tree oid
You can’t perform that action at this time.
0 commit comments