You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
backend: use workspace commit state for integration checks and remove git2 usage
Refactor upstream integration logic to remove direct git2 repo traversal and instead rely on gix and workspace-provided commit state.
Changes in crates/gitbutler-branch-actions/src/upstream_integration.rs:
- Removed usage of git2::Repository and IsCommitIntegrated checks that relied on git2 traversal.
- Introduced std::collections::HashMap to map commit ids to workspace commits.
- Use branch.commits first item to determine empty branches and map integrated state from but_workspace::ui::CommitState::Integrated.
- Cleaned up duplicated logic and removed unnecessary gix/git2 based graph and upstream commit computations.
- Built a commit_map of commits from details.branch_details for quick lookup when deciding if a commit is integrated.
These changes adjust integration checks to use in-memory workspace state instead of git2 interactions, and handle empty branches more robustly.
0 commit comments