@@ -696,7 +696,7 @@ pub(crate) fn reset_branch(
696696 // what hunks were released by this reset, and assign them to this branch.
697697 let old_head = get_workspace_head ( ctx) ?;
698698
699- stack. set_stack_head ( ctx , target_commit_id, None ) ?;
699+ stack. set_stack_head ( & vb_state , & gix_repo , target_commit_id, None ) ?;
700700
701701 let updated_head = get_workspace_head ( ctx) ?;
702702 let repo = ctx. repo ( ) ;
@@ -829,7 +829,7 @@ pub fn commit(
829829 } ;
830830
831831 let vb_state = ctx. project ( ) . virtual_branches ( ) ;
832- branch. set_stack_head ( ctx , commit_oid, Some ( tree_oid) ) ?;
832+ branch. set_stack_head ( & vb_state , & gix_repo , commit_oid, Some ( tree_oid) ) ?;
833833
834834 crate :: integration:: update_workspace_commit ( & vb_state, ctx)
835835 . context ( "failed to update gitbutler workspace" ) ?;
@@ -1320,7 +1320,7 @@ pub(crate) fn move_commit_file(
13201320
13211321 // if there are no upstream commits (the "to" commit was the branch head), then we're done
13221322 if upstream_commits. is_empty ( ) {
1323- target_stack. set_stack_head ( ctx , commit_oid, None ) ?;
1323+ target_stack. set_stack_head ( & vb_state , & gix_repo , commit_oid, None ) ?;
13241324 crate :: integration:: update_workspace_commit ( & vb_state, ctx) ?;
13251325 return Ok ( commit_oid) ;
13261326 }
@@ -1331,7 +1331,7 @@ pub(crate) fn move_commit_file(
13311331
13321332 // if that rebase worked, update the branch head and the gitbutler workspace
13331333 if let Some ( new_head) = new_head {
1334- target_stack. set_stack_head ( ctx , new_head, None ) ?;
1334+ target_stack. set_stack_head ( & vb_state , & gix_repo , new_head, None ) ?;
13351335 crate :: integration:: update_workspace_commit ( & vb_state, ctx) ?;
13361336 Ok ( commit_oid)
13371337 } else {
@@ -1401,7 +1401,7 @@ pub(crate) fn insert_blank_commit(
14011401 let output = rebase. rebase ( ) ?;
14021402 stack. set_heads_from_rebase_output ( ctx, output. references ) ?;
14031403
1404- stack. set_stack_head ( ctx , output. top_commit . to_git2 ( ) , None ) ?;
1404+ stack. set_stack_head ( & vb_state , & repo , output. top_commit . to_git2 ( ) , None ) ?;
14051405
14061406 crate :: integration:: update_workspace_commit ( & vb_state, ctx)
14071407 . context ( "failed to update gitbutler workspace" ) ?;
@@ -1470,7 +1470,7 @@ pub(crate) fn update_commit_message(
14701470 let output = rebase. rebase ( ) ?;
14711471
14721472 let new_head = output. top_commit . to_git2 ( ) ;
1473- stack. set_stack_head ( ctx , new_head, None ) ?;
1473+ stack. set_stack_head ( & vb_state , & gix_repo , new_head, None ) ?;
14741474 stack. set_heads_from_rebase_output ( ctx, output. references ) ?;
14751475
14761476 crate :: integration:: update_workspace_commit ( & vb_state, ctx)
0 commit comments