Skip to content

Commit 9a595f3

Browse files
committed
Add gix::open_with_environment_overrides
1 parent 04a18f3 commit 9a595f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gix/src/lib.rs

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

225+
/// See [`ThreadSafeRepository::open_with_environment_overrides()`], but returns a [`Repository`] instead.
226+
#[allow(clippy::result_large_err)]
227+
pub fn open_with_environment_overrides(directory: impl AsRef<std::path::Path>) -> Result<Repository, discover::Error> {
228+
ThreadSafeRepository::open_with_environment_overrides(directory, Default::default()).map(Into::into)
229+
}
230+
225231
/// See [`ThreadSafeRepository::init()`], but returns a [`Repository`] instead.
226232
#[allow(clippy::result_large_err)]
227233
pub fn init(directory: impl AsRef<std::path::Path>) -> Result<Repository, init::Error> {

0 commit comments

Comments
 (0)