@@ -41,12 +41,15 @@ pub mod attributes;
4141mod cache;
4242mod config;
4343///
44+ #[ allow( clippy:: empty_docs) ]
4445#[ cfg( feature = "blob-diff" ) ]
4546pub mod diff;
4647///
48+ #[ allow( clippy:: empty_docs) ]
4749#[ cfg( feature = "dirwalk" ) ]
4850mod dirwalk;
4951///
52+ #[ allow( clippy:: empty_docs) ]
5053#[ cfg( feature = "attributes" ) ]
5154pub mod filter;
5255mod graph;
@@ -73,6 +76,24 @@ mod submodule;
7376mod thread_safe;
7477mod worktree;
7578
79+ ///
80+ #[ allow( clippy:: empty_docs) ]
81+ #[ cfg( feature = "index" ) ]
82+ pub mod index_from_tree {
83+ /// The error returned by [Repository::index_from_tree()](crate::Repository::index_from_tree).
84+ #[ derive( Debug , thiserror:: Error ) ]
85+ #[ allow( missing_docs) ]
86+ pub enum Error {
87+ #[ error( "Could not create index from tree at {id}" ) ]
88+ IndexFromTree {
89+ id : gix_hash:: ObjectId ,
90+ source : gix_index:: init:: from_tree:: Error ,
91+ } ,
92+ #[ error( "Couldn't obtain configuration for core.protect*" ) ]
93+ BooleanConfig ( #[ from] crate :: config:: boolean:: Error ) ,
94+ }
95+ }
96+
7697///
7798#[ allow( clippy:: empty_docs) ]
7899pub mod branch_remote_ref_name {
@@ -133,7 +154,7 @@ pub mod index_or_load_from_head {
133154 #[ error( transparent) ]
134155 TreeId ( #[ from] gix_object:: decode:: Error ) ,
135156 #[ error( transparent) ]
136- TraverseTree ( #[ from] gix_traverse :: tree :: breadthfirst :: Error ) ,
157+ TraverseTree ( #[ from] crate :: repository :: index_from_tree :: Error ) ,
137158 #[ error( transparent) ]
138159 OpenIndex ( #[ from] crate :: worktree:: open_index:: Error ) ,
139160 }
@@ -149,7 +170,7 @@ pub mod worktree_stream {
149170 #[ error( transparent) ]
150171 FindTree ( #[ from] crate :: object:: find:: existing:: Error ) ,
151172 #[ error( transparent) ]
152- OpenTree ( #[ from] gix_traverse :: tree :: breadthfirst :: Error ) ,
173+ OpenTree ( #[ from] crate :: repository :: index_from_tree :: Error ) ,
153174 #[ error( transparent) ]
154175 AttributesCache ( #[ from] crate :: config:: attribute_stack:: Error ) ,
155176 #[ error( transparent) ]
0 commit comments