@@ -3,7 +3,7 @@ use std::path::PathBuf;
3
3
use git_features:: threading:: OwnShared ;
4
4
use git_sec:: Trust ;
5
5
6
- use crate :: Permissions ;
6
+ use crate :: { Permissions , ThreadSafeRepository } ;
7
7
8
8
/// A way to configure the usage of replacement objects, see `git replace`.
9
9
#[ derive( Debug , Clone ) ]
@@ -60,7 +60,7 @@ impl ReplacementObjects {
60
60
}
61
61
}
62
62
63
- /// The options used in [`Repository ::open_opts`]
63
+ /// The options used in [`ThreadSafeRepository ::open_opts`]
64
64
#[ derive( Default , Clone ) ]
65
65
pub struct Options {
66
66
object_store_slots : git_odb:: store:: init:: Slots ,
@@ -118,8 +118,8 @@ impl Options {
118
118
}
119
119
120
120
/// Open a repository at `path` with the options set so far.
121
- pub fn open ( self , path : impl Into < std:: path:: PathBuf > ) -> Result < crate :: ThreadSafeRepository , Error > {
122
- crate :: ThreadSafeRepository :: open_opts ( path, self )
121
+ pub fn open ( self , path : impl Into < std:: path:: PathBuf > ) -> Result < ThreadSafeRepository , Error > {
122
+ ThreadSafeRepository :: open_opts ( path, self )
123
123
}
124
124
}
125
125
@@ -156,7 +156,7 @@ pub enum Error {
156
156
EnvironmentAccessDenied ( #[ from] crate :: permission:: env_var:: resource:: Error ) ,
157
157
}
158
158
159
- impl crate :: ThreadSafeRepository {
159
+ impl ThreadSafeRepository {
160
160
/// Open a git repository at the given `path`, possibly expanding it to `path/.git` if `path` is a work tree dir.
161
161
pub fn open ( path : impl Into < std:: path:: PathBuf > ) -> Result < Self , Error > {
162
162
Self :: open_opts ( path, Options :: default ( ) )
@@ -179,7 +179,7 @@ impl crate::ThreadSafeRepository {
179
179
} ;
180
180
let ( git_dir, worktree_dir) =
181
181
git_discover:: repository:: Path :: from_dot_git_dir ( path, kind) . into_repository_and_work_tree_directories ( ) ;
182
- crate :: ThreadSafeRepository :: open_from_paths ( git_dir, worktree_dir, options)
182
+ ThreadSafeRepository :: open_from_paths ( git_dir, worktree_dir, options)
183
183
}
184
184
185
185
/// Try to open a git repository in `fallback_directory` (can be worktree or `.git` directory) only if there is no override
@@ -210,7 +210,7 @@ impl crate::ThreadSafeRepository {
210
210
211
211
let trust = git_sec:: Trust :: from_path_ownership ( & git_dir) ?;
212
212
let options = trust_map. into_value_by_level ( trust) ;
213
- crate :: ThreadSafeRepository :: open_from_paths ( git_dir, worktree_dir, options)
213
+ ThreadSafeRepository :: open_from_paths ( git_dir, worktree_dir, options)
214
214
}
215
215
216
216
pub ( crate ) fn open_from_paths (
@@ -298,7 +298,7 @@ impl crate::ThreadSafeRepository {
298
298
} ,
299
299
} ;
300
300
301
- Ok ( crate :: ThreadSafeRepository {
301
+ Ok ( ThreadSafeRepository {
302
302
objects : OwnShared :: new ( git_odb:: Store :: at_opts (
303
303
common_dir_ref. join ( "objects" ) ,
304
304
replacements,
0 commit comments