@@ -62,9 +62,21 @@ pub mod main_worktree {
62
62
///
63
63
/// Note that this is a no-op if the remote was empty, leaving this repository empty as well. This can be validated by checking
64
64
/// if the `head()` of the returned repository is not unborn.
65
- pub fn main_worktree (
65
+ pub fn main_worktree < P > (
66
66
& mut self ,
67
- mut progress : impl gix_features:: progress:: NestedProgress ,
67
+ mut progress : P ,
68
+ should_interrupt : & AtomicBool ,
69
+ ) -> Result < ( Repository , gix_worktree_state:: checkout:: Outcome ) , Error >
70
+ where
71
+ P : gix_features:: progress:: NestedProgress ,
72
+ P :: SubProgress : gix_features:: progress:: NestedProgress + ' static ,
73
+ {
74
+ self . main_worktree_inner ( & mut progress, should_interrupt)
75
+ }
76
+
77
+ fn main_worktree_inner (
78
+ & mut self ,
79
+ progress : & mut dyn gix_features:: progress:: DynNestedProgress ,
68
80
should_interrupt : & AtomicBool ,
69
81
) -> Result < ( Repository , gix_worktree_state:: checkout:: Outcome ) , Error > {
70
82
let _span = gix_trace:: coarse!( "gix::clone::PrepareCheckout::main_worktree()" ) ;
@@ -96,8 +108,8 @@ pub mod main_worktree {
96
108
. checkout_options ( repo, gix_worktree:: stack:: state:: attributes:: Source :: IdMapping ) ?;
97
109
opts. destination_is_initially_empty = true ;
98
110
99
- let mut files = progress. add_child_with_id ( "checkout" , ProgressId :: CheckoutFiles . into ( ) ) ;
100
- let mut bytes = progress. add_child_with_id ( "writing" , ProgressId :: BytesWritten . into ( ) ) ;
111
+ let mut files = progress. add_child_with_id ( "checkout" . to_string ( ) , ProgressId :: CheckoutFiles . into ( ) ) ;
112
+ let mut bytes = progress. add_child_with_id ( "writing" . to_string ( ) , ProgressId :: BytesWritten . into ( ) ) ;
101
113
102
114
files. init ( Some ( index. entries ( ) . len ( ) ) , crate :: progress:: count ( "files" ) ) ;
103
115
bytes. init ( None , crate :: progress:: bytes ( ) ) ;
0 commit comments