File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ fn tree_diff_at_file_path(
399
399
}
400
400
401
401
fn visit ( & mut self , change : gix_diff:: tree:: visit:: Change ) -> gix_diff:: tree:: visit:: Action {
402
- use gix_diff:: tree:: visit:: Action :: * ;
402
+ use gix_diff:: tree:: visit;
403
403
use gix_diff:: tree:: visit:: Change :: * ;
404
404
405
405
if self . inner . path ( ) == self . interesting_path {
@@ -438,11 +438,9 @@ fn tree_diff_at_file_path(
438
438
} ,
439
439
} ) ;
440
440
441
- // When we return `Cancel`, `gix_diff::tree` will convert this `Cancel` into an
442
- // `Err(...)`. Keep this in mind when using `FindChangeToPath`.
443
- Cancel
441
+ visit:: Action :: Cancel
444
442
} else {
445
- Continue
443
+ visit :: Action :: Continue
446
444
}
447
445
}
448
446
}
@@ -452,9 +450,6 @@ fn tree_diff_at_file_path(
452
450
stats. trees_diffed += 1 ;
453
451
454
452
match result {
455
- // `recorder` cancels the traversal by returning `Cancel` when a change to `file_path` is
456
- // found. `gix_diff::tree` converts `Cancel` into `Err(Cancelled)` which is why we match on
457
- // `Err(Cancelled)` in addition to `Ok`.
458
453
Ok ( _) | Err ( gix_diff:: tree:: Error :: Cancelled ) => Ok ( recorder. change ) ,
459
454
Err ( error) => Err ( Error :: DiffTree ( error) ) ,
460
455
}
You can’t perform that action at this time.
0 commit comments