File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,7 @@ pub mod main_worktree {
118118                } ) ?; 
119119            let  mut  index = gix_index:: File :: from_state ( index,  repo. index_path ( ) ) ; 
120120
121-             let  mut  opts = repo
122-                 . config 
123-                 . checkout_options ( repo,  gix_worktree:: stack:: state:: attributes:: Source :: IdMapping ) ?; 
121+             let  mut  opts = repo. checkout_options ( gix_worktree:: stack:: state:: attributes:: Source :: IdMapping ) ?; 
124122            opts. destination_is_initially_empty  = true ; 
125123
126124            let  mut  files = progress. add_child_with_id ( "checkout" . to_string ( ) ,  ProgressId :: CheckoutFiles . into ( ) ) ; 
Original file line number Diff line number Diff line change 1+ use  crate :: { config,  Repository } ; 
2+ 
3+ impl  Repository  { 
4+     /// Return options that can be used to drive a low-level checkout operation. 
5+ /// Use `attributes_source` to determine where `.gitattributes` files should be read from, which depends on 
6+ /// the presence of a worktree to begin with. 
7+ /// Here, typically this value would be [`gix_worktree::stack::state::attributes::Source::IdMapping`] 
8+ pub  fn  checkout_options ( 
9+         & self , 
10+         attributes_source :  gix_worktree:: stack:: state:: attributes:: Source , 
11+     )  -> Result < gix_worktree_state:: checkout:: Options ,  config:: checkout_options:: Error >  { 
12+         self . config . checkout_options ( self ,  attributes_source) 
13+     } 
14+ } 
Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ pub enum Kind {
2020#[ cfg( any( feature = "attributes" ,  feature = "excludes" ) ) ]  
2121pub  mod  attributes; 
2222mod  cache; 
23+ #[ cfg( feature = "worktree-mutation" ) ]  
24+ mod  checkout; 
2325mod  config; 
26+ 
2427/// 
2528#[ cfg( feature = "blob-diff" ) ]  
2629mod  diff; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments