@@ -37,6 +37,7 @@ pub struct PrepareFetch {
3737    /// The name of the reference to fetch. If `None`, the reference pointed to by `HEAD` will be checked out. 
3838     #[ cfg_attr( not( feature = "blocking-network-client" ) ,  allow( dead_code) ) ]  
3939    ref_name :  Option < gix_ref:: PartialName > , 
40+     leave_dirty :  bool , 
4041} 
4142
4243/// The error returned by [`PrepareFetch::new()`]. 
@@ -126,6 +127,7 @@ impl PrepareFetch {
126127            configure_connection :  None , 
127128            shallow :  remote:: fetch:: Shallow :: NoChange , 
128129            ref_name :  None , 
130+             leave_dirty :  false , 
129131        } ) 
130132    } 
131133} 
@@ -140,6 +142,7 @@ pub struct PrepareCheckout {
140142     pub ( self )  repo :  Option < crate :: Repository > , 
141143    /// The name of the reference to check out. If `None`, the reference pointed to by `HEAD` will be checked out. 
142144     pub ( self )  ref_name :  Option < gix_ref:: PartialName > , 
145+     pub ( self )  leave_dirty :  bool , 
143146} 
144147
145148// This module encapsulates functionality that works with both feature toggles. Can be combined with `fetch` 
@@ -170,6 +173,13 @@ mod access_feat {
170173            self . fetch_options  = opts; 
171174            self 
172175        } 
176+ 
177+         /// Set whether to delete the repo directory when the PrepareFetch or PrepareCheckout 
178+          /// object is dropped. 
179+          pub  fn  with_leave_dirty ( mut  self ,  leave_dirty :  bool )  -> Self  { 
180+             self . leave_dirty  = leave_dirty; 
181+             self 
182+         } 
173183    } 
174184} 
175185
0 commit comments