Skip to content

Commit 85499e4

Browse files
committed
Remove reset of match_ceiling_dir_or_error in apply_environment()
In https://github.com/Byron/gitoxide/pull/721/files, this reset was added which makes using [ThreadSafeRepository::discover_with_environment_overrides_opts]( https://github.com/Byron/gitoxide/blob/f7adf97bc6aa2bf82f906c4463b1cbb3f9cddae3/gix/src/discover.rs#L67) inconvenient. If the old behaviour of `match_ceiling_dir_or_error = false` desired, then it can be achieved by setting it on `options` just before calling `apply_environment()`. The inverse is not true, and `ThreadSafeRepository::discover_with_environment_overrides_opts` cannot enable this flag because `apply_environment` overrides it.
1 parent f7adf97 commit 85499e4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-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
}

0 commit comments

Comments
 (0)