@@ -19,8 +19,8 @@ use crate::util::{self, path_to_repo_path, Binding};
19
19
use crate :: CherrypickOptions ;
20
20
use crate :: RevertOptions ;
21
21
use crate :: {
22
- init , raw, AttrCheckFlags , Buf , Error , Object , Remote , RepositoryOpenFlags , RepositoryState ,
23
- Revspec , StashFlags ,
22
+ raw, AttrCheckFlags , Buf , Error , Object , Remote , RepositoryOpenFlags , RepositoryState , Revspec ,
23
+ StashFlags ,
24
24
} ;
25
25
use crate :: {
26
26
AnnotatedCommit , MergeAnalysis , MergeOptions , MergePreference , SubmoduleIgnore , SubmoduleStatus ,
@@ -65,7 +65,7 @@ impl Repository {
65
65
///
66
66
/// The path can point to either a normal or bare repository.
67
67
pub fn open < P : AsRef < Path > > ( path : P ) -> Result < Repository , Error > {
68
- init ( ) ;
68
+ crate :: init ( ) ;
69
69
// Normal file path OK (does not need Windows conversion).
70
70
let path = path. as_ref ( ) . into_c_string ( ) ?;
71
71
let mut ret = ptr:: null_mut ( ) ;
@@ -79,7 +79,7 @@ impl Repository {
79
79
///
80
80
/// The path can point to only a bare repository.
81
81
pub fn open_bare < P : AsRef < Path > > ( path : P ) -> Result < Repository , Error > {
82
- init ( ) ;
82
+ crate :: init ( ) ;
83
83
// Normal file path OK (does not need Windows conversion).
84
84
let path = path. as_ref ( ) . into_c_string ( ) ?;
85
85
let mut ret = ptr:: null_mut ( ) ;
@@ -95,7 +95,7 @@ impl Repository {
95
95
/// With `$GIT_DIR` unset, this will search for a repository starting in
96
96
/// the current directory.
97
97
pub fn open_from_env ( ) -> Result < Repository , Error > {
98
- init ( ) ;
98
+ crate :: init ( ) ;
99
99
let mut ret = ptr:: null_mut ( ) ;
100
100
let flags = raw:: GIT_REPOSITORY_OPEN_FROM_ENV ;
101
101
unsafe {
@@ -145,7 +145,7 @@ impl Repository {
145
145
O : AsRef < OsStr > ,
146
146
I : IntoIterator < Item = O > ,
147
147
{
148
- init ( ) ;
148
+ crate :: init ( ) ;
149
149
// Normal file path OK (does not need Windows conversion).
150
150
let path = path. as_ref ( ) . into_c_string ( ) ?;
151
151
let ceiling_dirs_os = env:: join_paths ( ceiling_dirs) ?;
@@ -168,7 +168,7 @@ impl Repository {
168
168
/// until it finds a repository.
169
169
pub fn discover < P : AsRef < Path > > ( path : P ) -> Result < Repository , Error > {
170
170
// TODO: this diverges significantly from the libgit2 API
171
- init ( ) ;
171
+ crate :: init ( ) ;
172
172
let buf = Buf :: new ( ) ;
173
173
// Normal file path OK (does not need Windows conversion).
174
174
let path = path. as_ref ( ) . into_c_string ( ) ?;
@@ -206,7 +206,7 @@ impl Repository {
206
206
path : P ,
207
207
opts : & RepositoryInitOptions ,
208
208
) -> Result < Repository , Error > {
209
- init ( ) ;
209
+ crate :: init ( ) ;
210
210
// Normal file path OK (does not need Windows conversion).
211
211
let path = path. as_ref ( ) . into_c_string ( ) ?;
212
212
let mut ret = ptr:: null_mut ( ) ;
@@ -238,7 +238,7 @@ impl Repository {
238
238
239
239
/// Attempt to wrap an object database as a repository.
240
240
pub fn from_odb ( odb : Odb < ' _ > ) -> Result < Repository , Error > {
241
- init ( ) ;
241
+ crate :: init ( ) ;
242
242
let mut ret = ptr:: null_mut ( ) ;
243
243
unsafe {
244
244
try_call ! ( raw:: git_repository_wrap_odb( & mut ret, odb. raw( ) ) ) ;
0 commit comments