summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/discover.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/gix/src/discover.rs
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix/src/discover.rs')
-rw-r--r--vendor/gix/src/discover.rs6
1 files changed, 5 insertions, 1 deletions
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<Path>,
options: upwards::Options<'_>,
trust_map: gix_sec::trust::Mapping<crate::open::Options>,
) -> Result<Self, Error> {
- 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<Path>,
mut options: upwards::Options<'_>,