From c44d09055119b00d448485086047f5aac843907b Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 28 Aug 2024 22:46:03 +0200 Subject: [PATCH] See if `get_workspace_head()` fixes E2E --- crates/gitbutler-branch-actions/src/status.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/gitbutler-branch-actions/src/status.rs b/crates/gitbutler-branch-actions/src/status.rs index dc2f5ae287..e9b72a08c6 100644 --- a/crates/gitbutler-branch-actions/src/status.rs +++ b/crates/gitbutler-branch-actions/src/status.rs @@ -1,5 +1,6 @@ use std::{collections::HashMap, path::PathBuf, vec}; +use crate::integration::get_workspace_head; use crate::{ conflicts::RepoConflictsExt, file::{virtual_hunks_into_virtual_files, VirtualBranchFile}, @@ -16,7 +17,6 @@ use gitbutler_command_context::CommandContext; use gitbutler_diff::{diff_files_into_hunks, GitHunk, Hunk, HunkHash}; use gitbutler_operating_modes::assure_open_workspace_mode; use gitbutler_project::access::WorktreeWritePermission; -use gitbutler_repo::RepositoryExt; use tracing::instrument; /// Represents the uncommitted status of the applied virtual branches in the workspace. @@ -51,7 +51,7 @@ pub fn get_applied_status_cached( // calculate which should already be 'fixed' - why do we have the integration branch // if we can't assume it's in the right state? So ideally, we assure that the code // that affects the integration branch also updates it? - let integration_commit_id = ctx.repository().head_commit()?.id(); + let integration_commit_id = get_workspace_head(ctx)?; let mut virtual_branches = ctx .project() .virtual_branches()