diff --git a/eden/scm/lib/identity/src/lib.rs b/eden/scm/lib/identity/src/lib.rs index 4742f159b7afb..41e2a0c2c0ef3 100644 --- a/eden/scm/lib/identity/src/lib.rs +++ b/eden/scm/lib/identity/src/lib.rs @@ -430,7 +430,7 @@ mod idents { use super::*; pub fn all() -> &'static [Identity] { - &[SL, HG, SL_GIT] + &[SL, HG] } } @@ -439,11 +439,7 @@ mod idents { use super::*; pub fn all() -> &'static [Identity] { - if in_test() { - &[SL, HG, SL_GIT] - } else { - &[SL, SL_GIT] - } + if in_test() { &[SL, HG] } else { &[SL] } } } @@ -456,6 +452,8 @@ pub mod idents { } } +static EXTRA_SNIFF_IDENTS: &'static [Identity] = &[SL_GIT]; + static INITIAL_DEFAULT: Lazy = Lazy::new(compute_default); static DEFAULT: Lazy> = Lazy::new(|| RwLock::new(*INITIAL_DEFAULT)); @@ -524,7 +522,7 @@ pub fn cli_name() -> &'static str { /// "{path}/.sl" directories, yielding the sniffed Identity, if any. /// Only permissions errors are propagated. pub fn sniff_dir(path: &Path) -> Result> { - for id in all() { + for id in all().iter().chain(EXTRA_SNIFF_IDENTS) { if let Some(cli_names) = id.repo.sniff_initial_cli_names { if !cli_names.contains(INITIAL_DEFAULT.cli_name()) { continue;