1+ use crate :: repository:: diff_resource_cache;
12use crate :: Repository ;
23
3- ///
4- pub mod resource_cache {
5- /// The error returned by [Repository::diff_resource_cache()](super::Repository::diff_resource_cache()).
6- #[ derive( Debug , thiserror:: Error ) ]
7- #[ allow( missing_docs) ]
8- pub enum Error {
9- #[ error( "Could not obtain resource cache for diffing" ) ]
10- ResourceCache ( #[ from] crate :: diff:: resource_cache:: Error ) ,
11- #[ error( transparent) ]
12- Index ( #[ from] crate :: repository:: index_or_load_from_head:: Error ) ,
13- #[ error( transparent) ]
14- AttributeStack ( #[ from] crate :: config:: attribute_stack:: Error ) ,
15- }
16- }
17-
184/// Diff-utilities
195impl Repository {
206 /// Create a resource cache for diffable objects, and configured with everything it needs to know to perform diffs
@@ -31,7 +17,7 @@ impl Repository {
3117 & self ,
3218 mode : gix_diff:: blob:: pipeline:: Mode ,
3319 worktree_roots : gix_diff:: blob:: pipeline:: WorktreeRoots ,
34- ) -> Result < gix_diff:: blob:: Platform , resource_cache :: Error > {
20+ ) -> Result < gix_diff:: blob:: Platform , diff_resource_cache :: Error > {
3521 let index = self . index_or_load_from_head ( ) ?;
3622 Ok ( crate :: diff:: resource_cache (
3723 self ,
@@ -52,7 +38,7 @@ impl Repository {
5238 /// Return a resource cache suitable for diffing blobs from trees directly, where no worktree checkout exists.
5339 ///
5440 /// For more control, see [`diff_resource_cache()`](Self::diff_resource_cache).
55- pub fn diff_resource_cache_for_tree_diff ( & self ) -> Result < gix_diff:: blob:: Platform , resource_cache :: Error > {
41+ pub fn diff_resource_cache_for_tree_diff ( & self ) -> Result < gix_diff:: blob:: Platform , diff_resource_cache :: Error > {
5642 self . diff_resource_cache (
5743 gix_diff:: blob:: pipeline:: Mode :: ToGit ,
5844 gix_diff:: blob:: pipeline:: WorktreeRoots :: default ( ) ,
0 commit comments