File tree 5 files changed +25
-2
lines changed
5 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ mod prefix {
47
47
#[ error( transparent) ]
48
48
FindExisting ( #[ from] crate :: object:: find:: existing:: OdbError ) ,
49
49
#[ error( transparent) ]
50
- Config ( #[ from] git_config :: parser :: ParserOrIoError < ' static > ) ,
50
+ Config ( #[ from] crate :: config :: open :: Error ) ,
51
51
#[ error( transparent) ]
52
52
Prefix ( #[ from] git_hash:: prefix:: Error ) ,
53
53
}
Original file line number Diff line number Diff line change @@ -228,6 +228,18 @@ pub fn open(directory: impl Into<std::path::PathBuf>) -> Result<crate::Repositor
228
228
///
229
229
pub mod open;
230
230
231
+ ///
232
+ mod config {
233
+ ///
234
+ pub mod open {
235
+ pub type Error = git_config:: parser:: ParserOrIoError < ' static > ;
236
+ }
237
+ ///
238
+ pub mod query {
239
+ pub type Error = git_config:: file:: GitConfigError < ' static > ;
240
+ }
241
+ }
242
+
231
243
///
232
244
pub mod init {
233
245
use std:: { convert:: TryInto , path:: Path } ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ impl Options {
31
31
#[ allow( missing_docs) ]
32
32
pub enum Error {
33
33
#[ error( transparent) ]
34
- Config ( #[ from] git_config :: parser :: ParserOrIoError < ' static > ) ,
34
+ Config ( #[ from] crate :: config :: open :: Error ) ,
35
35
#[ error( transparent) ]
36
36
NotARepository ( #[ from] crate :: path:: is:: Error ) ,
37
37
#[ error( transparent) ]
Original file line number Diff line number Diff line change
1
+ use crate :: config;
2
+
3
+ /// Provide simplified access to git configuration values
4
+ impl crate :: Repository {
5
+ /// Return the integer value at `key` (like `core.abbrev`) or use the given `default` value if it isn't present.
6
+ pub fn config_int ( _key : & str , _default : i64 ) -> Result < i64 , config:: query:: Error > {
7
+ todo ! ( )
8
+ }
9
+ }
Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ mod trait_impls;
82
82
83
83
mod cache;
84
84
85
+ mod config;
86
+
85
87
mod reference;
86
88
87
89
mod object;
You can’t perform that action at this time.
0 commit comments