1
+ use crate :: repository:: diff_resource_cache;
1
2
use crate :: Repository ;
2
3
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
-
18
4
/// Diff-utilities
19
5
impl Repository {
20
6
/// Create a resource cache for diffable objects, and configured with everything it needs to know to perform diffs
@@ -31,7 +17,7 @@ impl Repository {
31
17
& self ,
32
18
mode : gix_diff:: blob:: pipeline:: Mode ,
33
19
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 > {
35
21
let index = self . index_or_load_from_head ( ) ?;
36
22
Ok ( crate :: diff:: resource_cache (
37
23
self ,
@@ -52,7 +38,7 @@ impl Repository {
52
38
/// Return a resource cache suitable for diffing blobs from trees directly, where no worktree checkout exists.
53
39
///
54
40
/// 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 > {
56
42
self . diff_resource_cache (
57
43
gix_diff:: blob:: pipeline:: Mode :: ToGit ,
58
44
gix_diff:: blob:: pipeline:: WorktreeRoots :: default ( ) ,
0 commit comments