Skip to content

Commit 4522b22

Browse files
committed
Fix commting with one stack
There was an issue where the parents of the workspace commit are not always up to date. While this is something we seperatly need to fix, it also makes sense to move to something more reliable. (And also reduce the amount of forking in the function). As such, I've switched it to always use the multi-branch case
1 parent 558d498 commit 4522b22

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

crates/but-workspace/src/commit_engine/reference_frame.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ impl ReferenceFrame {
2222
) -> anyhow::Result<Self> {
2323
let head_id = repo.head_id()?;
2424
let workspace_commit = head_id.object()?.into_commit().decode()?.to_owned();
25-
if workspace_commit.parents.len() < 2 {
26-
return Ok(crate::commit_engine::ReferenceFrame {
27-
workspace_tip: Some(head_id.detach()),
28-
// The workspace commit is never the tip
29-
#[allow(clippy::indexing_slicing)]
30-
branch_tip: Some(workspace_commit.parents[0]),
31-
});
32-
}
3325

3426
let cache = repo.commit_graph_if_enabled()?;
3527
let mut graph = repo.revision_graph(cache.as_ref());

0 commit comments

Comments
 (0)