Skip to content

Commit daef221

Browse files
committed
fix docs
1 parent b27a8c2 commit daef221

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

git-repository/src/open.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::path::PathBuf;
33
use git_features::threading::OwnShared;
44
use git_sec::Trust;
55

6-
use crate::Permissions;
6+
use crate::{Permissions, ThreadSafeRepository};
77

88
/// A way to configure the usage of replacement objects, see `git replace`.
99
#[derive(Debug, Clone)]
@@ -60,7 +60,7 @@ impl ReplacementObjects {
6060
}
6161
}
6262

63-
/// The options used in [`Repository::open_opts`]
63+
/// The options used in [`ThreadSafeRepository::open_opts`]
6464
#[derive(Default, Clone)]
6565
pub struct Options {
6666
object_store_slots: git_odb::store::init::Slots,
@@ -118,8 +118,8 @@ impl Options {
118118
}
119119

120120
/// 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)
123123
}
124124
}
125125

@@ -156,7 +156,7 @@ pub enum Error {
156156
EnvironmentAccessDenied(#[from] crate::permission::env_var::resource::Error),
157157
}
158158

159-
impl crate::ThreadSafeRepository {
159+
impl ThreadSafeRepository {
160160
/// Open a git repository at the given `path`, possibly expanding it to `path/.git` if `path` is a work tree dir.
161161
pub fn open(path: impl Into<std::path::PathBuf>) -> Result<Self, Error> {
162162
Self::open_opts(path, Options::default())
@@ -179,7 +179,7 @@ impl crate::ThreadSafeRepository {
179179
};
180180
let (git_dir, worktree_dir) =
181181
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)
183183
}
184184

185185
/// 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 {
210210

211211
let trust = git_sec::Trust::from_path_ownership(&git_dir)?;
212212
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)
214214
}
215215

216216
pub(crate) fn open_from_paths(
@@ -298,7 +298,7 @@ impl crate::ThreadSafeRepository {
298298
},
299299
};
300300

301-
Ok(crate::ThreadSafeRepository {
301+
Ok(ThreadSafeRepository {
302302
objects: OwnShared::new(git_odb::Store::at_opts(
303303
common_dir_ref.join("objects"),
304304
replacements,

0 commit comments

Comments
 (0)