Skip to content

Commit 0672576

Browse files
committed
Rename to GIT_HIGHEST_SCOPE_CONFIG_PATH
This renames the crate-internal static item with the cached path of the highest scope nonempty config, treated as associated with the `git` installation, from `GIT_HIGHEST_PRIORITY_CONFIG_PATH` to `GIT_HIGHEST_SCOPE_CONFIG_PATH`. This reflects the propensity of "priority" to have the opposite of the intended meaning here, since configuration in this file stands to be superseded by configuration in any lower (i.e. any other) scope. See #1568 for context. I think this change from "PRIORITY" to "SCOPE" in the name preserves the benefits of the change from `EXE_INFO` to `GIT_HIGHEST_PRIORITY_CONFIG_PATH` (dd2d666), while making clearer what is going on and avoiding misinterpretations.
1 parent adbaa2a commit 0672576

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gix-path/src/env/git/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub(super) const EXE_NAME: &str = "git";
8080
/// Invoke the git executable to obtain the origin configuration, which is cached and returned.
8181
///
8282
/// The git executable is the one found in PATH or an alternative location.
83-
pub(super) static GIT_HIGHEST_PRIORITY_CONFIG_PATH: Lazy<Option<BString>> = Lazy::new(exe_info);
83+
pub(super) static GIT_HIGHEST_SCOPE_CONFIG_PATH: Lazy<Option<BString>> = Lazy::new(exe_info);
8484

8585
#[cfg(windows)]
8686
const NULL_DEVICE: &str = "NUL";
@@ -171,7 +171,7 @@ pub(super) fn install_config_path() -> Option<&'static BStr> {
171171
exec_path.push("gitconfig");
172172
return crate::os_string_into_bstring(exec_path.into()).ok();
173173
}
174-
GIT_HIGHEST_PRIORITY_CONFIG_PATH.clone()
174+
GIT_HIGHEST_SCOPE_CONFIG_PATH.clone()
175175
});
176176
PATH.as_ref().map(AsRef::as_ref)
177177
}

0 commit comments

Comments
 (0)