@@ -100,7 +100,7 @@ pub mod merge_resource_cache {
100
100
#[ error( transparent) ]
101
101
PipelineOptions ( #[ from] crate :: config:: merge:: pipeline_options:: Error ) ,
102
102
#[ error( transparent) ]
103
- Index ( #[ from] crate :: repository:: index_or_load_from_head :: Error ) ,
103
+ Index ( #[ from] crate :: repository:: index_or_load_from_head_or_empty :: Error ) ,
104
104
#[ error( transparent) ]
105
105
AttributeStack ( #[ from] crate :: config:: attribute_stack:: Error ) ,
106
106
#[ error( transparent) ]
@@ -154,7 +154,7 @@ pub mod diff_resource_cache {
154
154
#[ error( "Could not obtain resource cache for diffing" ) ]
155
155
ResourceCache ( #[ from] crate :: diff:: resource_cache:: Error ) ,
156
156
#[ error( transparent) ]
157
- Index ( #[ from] crate :: repository:: index_or_load_from_head :: Error ) ,
157
+ Index ( #[ from] crate :: repository:: index_or_load_from_head_or_empty :: Error ) ,
158
158
#[ error( transparent) ]
159
159
AttributeStack ( #[ from] crate :: config:: attribute_stack:: Error ) ,
160
160
}
@@ -289,7 +289,7 @@ pub mod pathspec_defaults_ignore_case {
289
289
///
290
290
#[ cfg( feature = "index" ) ]
291
291
pub mod index_or_load_from_head {
292
- /// The error returned by [`Repository::index_or_load_from_head()`][ crate::Repository::index_or_load_from_head()] .
292
+ /// The error returned by [`Repository::index_or_load_from_head()`]( crate::Repository::index_or_load_from_head()) .
293
293
#[ derive( thiserror:: Error , Debug ) ]
294
294
#[ allow( missing_docs) ]
295
295
pub enum Error {
@@ -304,10 +304,32 @@ pub mod index_or_load_from_head {
304
304
}
305
305
}
306
306
307
+ ///
308
+ #[ cfg( feature = "index" ) ]
309
+ pub mod index_or_load_from_head_or_empty {
310
+ /// The error returned by [`Repository::index_or_load_from_head_or_empty()`](crate::Repository::index_or_load_from_head_or_empty()).
311
+ #[ derive( thiserror:: Error , Debug ) ]
312
+ #[ allow( missing_docs) ]
313
+ pub enum Error {
314
+ #[ error( transparent) ]
315
+ ReadHead ( #[ from] crate :: reference:: find:: existing:: Error ) ,
316
+ #[ error( transparent) ]
317
+ FindCommit ( #[ from] crate :: object:: find:: existing:: Error ) ,
318
+ #[ error( transparent) ]
319
+ PeelToTree ( #[ from] crate :: object:: peel:: to_kind:: Error ) ,
320
+ #[ error( transparent) ]
321
+ TreeId ( #[ from] gix_object:: decode:: Error ) ,
322
+ #[ error( transparent) ]
323
+ TraverseTree ( #[ from] crate :: repository:: index_from_tree:: Error ) ,
324
+ #[ error( transparent) ]
325
+ OpenIndex ( #[ from] crate :: worktree:: open_index:: Error ) ,
326
+ }
327
+ }
328
+
307
329
///
308
330
#[ cfg( feature = "worktree-stream" ) ]
309
331
pub mod worktree_stream {
310
- /// The error returned by [`Repository::worktree_stream()`][ crate::Repository::worktree_stream()] .
332
+ /// The error returned by [`Repository::worktree_stream()`]( crate::Repository::worktree_stream()) .
311
333
#[ derive( Debug , thiserror:: Error ) ]
312
334
#[ allow( missing_docs) ]
313
335
pub enum Error {
@@ -332,6 +354,6 @@ pub mod worktree_stream {
332
354
///
333
355
#[ cfg( feature = "worktree-archive" ) ]
334
356
pub mod worktree_archive {
335
- /// The error returned by [`Repository::worktree_archive()`][ crate::Repository::worktree_archive()] .
357
+ /// The error returned by [`Repository::worktree_archive()`]( crate::Repository::worktree_archive()) .
336
358
pub type Error = gix_archive:: Error ;
337
359
}
0 commit comments