Skip to content

Update RepositoryOpenFlags in doc #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl Repository {

/// Find and open an existing repository, respecting git environment
/// variables. This acts like `open_ext` with the
/// `REPOSITORY_OPEN_FROM_ENV` flag, but additionally respects `$GIT_DIR`.
/// [FROM_ENV](RepositoryOpenFlags::FROM_ENV) flag, but additionally respects `$GIT_DIR`.
/// With `$GIT_DIR` unset, this will search for a repository starting in
/// the current directory.
pub fn open_from_env() -> Result<Repository, Error> {
Expand All @@ -175,23 +175,23 @@ impl Repository {

/// Find and open an existing repository, with additional options.
///
/// If flags contains REPOSITORY_OPEN_NO_SEARCH, the path must point
/// If flags contains [NO_SEARCH](RepositoryOpenFlags::NO_SEARCH), the path must point
/// directly to a repository; otherwise, this may point to a subdirectory
/// of a repository, and `open_ext` will search up through parent
/// directories.
///
/// If flags contains REPOSITORY_OPEN_CROSS_FS, the search through parent
/// If flags contains [CROSS_FS](RepositoryOpenFlags::CROSS_FS), the search through parent
/// directories will not cross a filesystem boundary (detected when the
/// stat st_dev field changes).
///
/// If flags contains REPOSITORY_OPEN_BARE, force opening the repository as
/// If flags contains [BARE](RepositoryOpenFlags::BARE), force opening the repository as
/// bare even if it isn't, ignoring any working directory, and defer
/// loading the repository configuration for performance.
///
/// If flags contains REPOSITORY_OPEN_NO_DOTGIT, don't try appending
/// If flags contains [NO_DOTGIT](RepositoryOpenFlags::NO_DOTGIT), don't try appending
/// `/.git` to `path`.
///
/// If flags contains REPOSITORY_OPEN_FROM_ENV, `open_ext` will ignore
/// If flags contains [FROM_ENV](RepositoryOpenFlags::FROM_ENV), `open_ext` will ignore
/// other flags and `ceiling_dirs`, and respect the same environment
/// variables git does. Note, however, that `path` overrides `$GIT_DIR`; to
/// respect `$GIT_DIR` as well, use `open_from_env`.
Expand Down