@@ -37,15 +37,15 @@ impl std::fmt::Debug for Stack {
3737
3838/// Structures related to creating a merge-commit along with the respective tree.
3939pub mod merge {
40+ use super :: Stack ;
41+ use crate :: WorkspaceCommit ;
4042 use anyhow:: { Context , bail} ;
43+ use but_core:: ref_metadata:: WorkspaceCommitRelation ;
4144 use but_graph:: SegmentIndex ;
4245 use gitbutler_oxidize:: GixRepositoryExt ;
4346 use gix:: prelude:: ObjectIdExt ;
4447 use tracing:: instrument;
4548
46- use super :: Stack ;
47- use crate :: WorkspaceCommit ;
48-
4949 /// A minimal stack for to represent a stack that conflicted.
5050 #[ derive( Debug , Clone ) ]
5151 pub struct ConflictingStack {
@@ -125,8 +125,17 @@ pub mod merge {
125125 let mut missing_stacks = Vec :: new ( ) ;
126126 let mut tips: Vec < _ > = stacks
127127 . into_iter ( )
128- . filter_map ( |s| s. branches . first ( ) )
129- . filter_map ( |top_segment| {
128+ . filter_map ( |s| s. branches . first ( ) . map ( |b| ( b, s. workspacecommit_relation ) ) )
129+ . filter_map ( |( top_segment, relation) | {
130+ match relation {
131+ WorkspaceCommitRelation :: Merged => { }
132+ WorkspaceCommitRelation :: UnmergedTree => {
133+ // These need to be part of the parents list, but shouldn't be merged.
134+ // If the caller wants to retry them, they can be passed here as "Merged".
135+ todo ! ( "this is a placeholder for where we will have to start handling this UnmergedTree" )
136+ }
137+ WorkspaceCommitRelation :: Outside => return None ,
138+ }
130139 let stack_tip_name = top_segment. ref_name . as_ref ( ) ;
131140 match graph. segment_and_commit_by_ref_name ( stack_tip_name) {
132141 None => {
0 commit comments