@@ -207,34 +207,36 @@ pub fn update(
207207 rewrite_cache. clear_resource_cache_keep_allocation ( ) ;
208208 diff_cache. clear_resource_cache_keep_allocation ( ) ;
209209 from. changes ( ) ?
210- . track_path ( )
211- . track_rewrites ( Some ( rewrites) )
210+ . options ( |opts| {
211+ opts. track_path ( ) . track_rewrites ( Some ( rewrites) ) ;
212+ } )
212213 . for_each_to_obtain_tree_with_cache ( & to, & mut rewrite_cache, |change| {
213- use gix:: object:: tree:: diff:: change :: Event :: * ;
214+ use gix:: object:: tree:: diff:: Change :: * ;
214215 change_counter. fetch_add ( 1 , Ordering :: SeqCst ) ;
215- match change. event {
216- Addition { entry_mode, id } => {
216+ match change {
217+ Addition {
218+ entry_mode,
219+ id,
220+ location,
221+ ..
222+ } => {
217223 if entry_mode. is_blob_or_symlink ( ) {
218- add_lines ( & mut out, change . location , & lines_counter, id) ;
224+ add_lines ( & mut out, location, & lines_counter, id) ;
219225 }
220226 }
221227 Modification {
222228 entry_mode,
223229 previous_entry_mode,
224230 id,
225231 previous_id,
232+ location,
226233 } => match ( previous_entry_mode. is_blob ( ) , entry_mode. is_blob ( ) ) {
227234 ( false , false ) => { }
228235 ( false , true ) => {
229- add_lines ( & mut out, change . location , & lines_counter, id) ;
236+ add_lines ( & mut out, location, & lines_counter, id) ;
230237 }
231238 ( true , false ) => {
232- add_lines (
233- & mut out,
234- change. location ,
235- & lines_counter,
236- previous_id,
237- ) ;
239+ add_lines ( & mut out, location, & lines_counter, previous_id) ;
238240 }
239241 ( true , true ) => {
240242 if let Ok ( cache) =
@@ -266,7 +268,7 @@ pub fn update(
266268 lines_counter
267269 . fetch_add ( nl, Ordering :: SeqCst ) ;
268270 out. push ( FileChange {
269- relpath : change . location . to_owned ( ) ,
271+ relpath : location. to_owned ( ) ,
270272 mode : FileMode :: Modified ,
271273 source_relpath : None ,
272274 lines : Some ( lines) ,
@@ -281,19 +283,25 @@ pub fn update(
281283 }
282284 }
283285 } ,
284- Deletion { entry_mode, id } => {
286+ Deletion {
287+ entry_mode,
288+ id,
289+ location,
290+ ..
291+ } => {
285292 if entry_mode. is_blob_or_symlink ( ) {
286- remove_lines ( & mut out, change . location , & lines_counter, id) ;
293+ remove_lines ( & mut out, location, & lines_counter, id) ;
287294 }
288295 }
289296 Rewrite {
290297 source_location,
291298 diff,
292299 copy,
300+ location,
293301 ..
294302 } => {
295303 out. push ( FileChange {
296- relpath : change . location . to_owned ( ) ,
304+ relpath : location. to_owned ( ) ,
297305 source_relpath : Some ( source_location. to_owned ( ) ) ,
298306 mode : if copy { FileMode :: Copy } else { FileMode :: Rename } ,
299307 lines : diff. map ( |d| LineStats {
@@ -369,7 +377,7 @@ pub fn update(
369377 }
370378 }
371379
372- impl < ' a , Find > gix:: prelude:: Find for Db < ' a , Find >
380+ impl < Find > gix:: prelude:: Find for Db < ' _ , Find >
373381 where
374382 Find : gix:: prelude:: Find + Clone ,
375383 {
0 commit comments