From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/gix/src/discover.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vendor/gix/src/discover.rs') diff --git a/vendor/gix/src/discover.rs b/vendor/gix/src/discover.rs index fa0edfd5f..964108810 100644 --- a/vendor/gix/src/discover.rs +++ b/vendor/gix/src/discover.rs @@ -2,6 +2,7 @@ use std::path::Path; pub use gix_discover::*; +use gix_macros::momo; use crate::{bstr::BString, ThreadSafeRepository}; @@ -31,12 +32,14 @@ impl ThreadSafeRepository { /// if the directory that is discovered can indeed be trusted (or else they'd have to implement the discovery themselves /// and be sure that no attacker ever gets access to a directory structure. The cost of this is a permission check, which /// seems acceptable). + #[momo] pub fn discover_opts( directory: impl AsRef, options: upwards::Options<'_>, trust_map: gix_sec::trust::Mapping, ) -> Result { - let (path, trust) = upwards_opts(directory, options)?; + let _span = gix_trace::coarse!("ThreadSafeRepository::discover()"); + let (path, trust) = upwards_opts(directory.as_ref(), options)?; let (git_dir, worktree_dir) = path.into_repository_and_work_tree_directories(); let mut options = trust_map.into_value_by_level(trust); options.git_dir_trust = trust.into(); @@ -60,6 +63,7 @@ impl ThreadSafeRepository { /// /// Finally, use the `trust_map` to determine which of our own repository options to use /// based on the trust level of the effective repository directory. + #[momo] pub fn discover_with_environment_overrides_opts( directory: impl AsRef, mut options: upwards::Options<'_>, -- cgit v1.2.3