Skip to content

Commit cda5b51

Browse files
committed
Merge branch 'match_ceiling_dir_or_error'
2 parents f7adf97 + 2e04403 commit cda5b51

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

gix-discover/src/upwards/types.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,12 @@ impl Options<'_> {
8787
///
8888
/// Note that `GIT_DISCOVERY_ACROSS_FILESYSTEM` for `cross_fs` is **not** read,
8989
/// as it requires parsing of `git-config` style boolean values.
90-
///
91-
/// In addition, this function disables `match_ceiling_dir_or_error` to allow
92-
/// discovery if an outside environment variable sets non-matching ceiling directories.
9390
// TODO: test
9491
pub fn apply_environment(mut self) -> Self {
9592
let name = "GIT_CEILING_DIRECTORIES";
9693
if let Some(ceiling_dirs) = env::var_os(name) {
9794
self.ceiling_dirs = parse_ceiling_dirs(&ceiling_dirs);
9895
}
99-
self.match_ceiling_dir_or_error = false;
10096
self
10197
}
10298
}

gix/src/discover.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ impl ThreadSafeRepository {
6363
///
6464
/// Finally, use the `trust_map` to determine which of our own repository options to use
6565
/// based on the trust level of the effective repository directory.
66+
///
67+
/// ### Note
68+
///
69+
/// Consider to set [`match_ceiling_dir_or_error = false`](gix_discover::upwards::Options::match_ceiling_dir_or_error)
70+
/// to allow discovery if an outside environment variable sets non-matching ceiling directories for greater
71+
/// compatibility with Git.
6672
#[momo]
6773
pub fn discover_with_environment_overrides_opts(
6874
directory: impl AsRef<Path>,

0 commit comments

Comments
 (0)