Skip to content

Commit 5ac6ba1

Browse files
committed
Add gix::discover_with_environment_overrides
1 parent 0843e80 commit 5ac6ba1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gix/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,14 @@ pub fn discover(directory: impl AsRef<std::path::Path>) -> Result<Repository, di
222222
ThreadSafeRepository::discover(directory).map(Into::into)
223223
}
224224

225+
/// See [`ThreadSafeRepository::discover_with_environment_overrides()`], but returns a [`Repository`] instead.
226+
#[allow(clippy::result_large_err)]
227+
pub fn discover_with_environment_overrides(
228+
directory: impl AsRef<std::path::Path>,
229+
) -> Result<Repository, discover::Error> {
230+
ThreadSafeRepository::discover_with_environment_overrides(directory).map(Into::into)
231+
}
232+
225233
/// See [`ThreadSafeRepository::open_with_environment_overrides()`], but returns a [`Repository`] instead.
226234
#[allow(clippy::result_large_err)]
227235
pub fn open_with_environment_overrides(directory: impl Into<std::path::PathBuf>) -> Result<Repository, open::Error> {

0 commit comments

Comments
 (0)