Skip to content

Commit bb8045d

Browse files
committed
Adjust the comment in discovery_opts to inform about upwards::Options trust handling.
1 parent c9ebac7 commit bb8045d

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

gix/src/discover.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ impl ThreadSafeRepository {
2727
/// for instantiations.
2828
///
2929
/// Note that [trust overrides](crate::open::Options::with()) in the `trust_map` are not effective here and we will
30-
/// always override it with the determined trust value. This is a precaution as the API user is unable to actually know
31-
/// if the directory that is discovered can indeed be trusted (or else they'd have to implement the discovery themselves
32-
/// and be sure that no attacker ever gets access to a directory structure. The cost of this is a permission check, which
33-
/// seems acceptable).
30+
/// always override it with the determined trust value as per [gix_discover::upwards::Options::trust].
31+
/// This value, however, can be set to [assume a given trust level](gix_discover::upwards::Trust::Assume) to let
32+
/// callers control the trust level without re-determining it.
3433
pub fn discover_opts(
3534
directory: impl AsRef<Path>,
3635
options: upwards::Options<'_>,

0 commit comments

Comments
 (0)