From 56dbcd5632d8a4adf7189196a4bb3942a9fe1f4d Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Thu, 12 Sep 2024 23:44:02 -0400 Subject: [PATCH 1/2] Copyedit `configure_command` comment --- tests/tools/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tools/src/lib.rs b/tests/tools/src/lib.rs index 47d68e3f979..d1132829b58 100644 --- a/tests/tools/src/lib.rs +++ b/tests/tools/src/lib.rs @@ -594,7 +594,7 @@ fn configure_command<'a, I: IntoIterator, S: AsRef>( args: I, script_result_directory: &Path, ) -> &'a mut std::process::Command { - // For simplicity, we extend the `MSYS` variable from from our own environment. This disregards + // For simplicity, we extend the `MSYS` variable from our own environment. This disregards // state from any prior `cmd.env("MSYS")` or `cmd.env_remove("MSYS")` calls. Such calls should // either be avoided, or made after this function returns (but before spawning the command). let mut msys_for_git_bash_on_windows = env::var_os("MSYS").unwrap_or_default(); From 1526b018c45a4392f20d01e1df014395824bc3bf Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Fri, 13 Sep 2024 23:18:02 -0400 Subject: [PATCH 2/2] Expand and clarify "unkown" scope comment in `git_cmd` - Mention `/Applications` as well as `/Library`, since macOS users with a full Xcode installation installation seem often to have Apple Git under `/Applications` rather than under `/Library`, but this higher-than-system "unknown" scope applies equally to both. - Expand the explanation enough to make clear what the conceptual relationship is between `GIT_CONFIG_SYSTEM` and `--system` and why the disparity between the scopes they select could be misleading in a relevant way. --- gix-path/src/env/git/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gix-path/src/env/git/mod.rs b/gix-path/src/env/git/mod.rs index 03d7a000aed..d2cb9b60b52 100644 --- a/gix-path/src/env/git/mod.rs +++ b/gix-path/src/env/git/mod.rs @@ -136,8 +136,9 @@ fn git_cmd(executable: PathBuf) -> Command { // // Separately from that, we can't use --system here, because scopes treated higher than the // system scope are possible. This commonly happens on macOS with Apple Git, where the config - // file under `/Library` is shown as an "unknown" scope but takes precedence over the system - // scope. Although `GIT_CONFIG_NOSYSTEM` will suppress this as well, passing --system omits it. + // file under `/Library` or `/Applications` is shown as an "unknown" scope but takes precedence + // over the system scope. Although `GIT_CONFIG_NOSYSTEM` suppresses this scope along with the + // system scope, passing --system selects only the system scope and omit this "unknown" scope. cmd.args(["config", "-lz", "--show-origin", "--name-only"]) .current_dir(cwd) .env_remove("GIT_CONFIG")