Skip to content

Commit a879d22

Browse files
committedSep 1, 2024·
fix: Omit other high-scoped config in fixtures
In addition to keeping fixture scripts from receiving global and system scope Git configuration variables, as was already done, this also omits configuration variables from high scopes similar to or above the system scope, associated with the Git installation but separate from the system scope. The main and possibly only case where this happens is the "unknown" scope associated with an Apple Git installation on macOS. This is a file usually located under `/Library` or `/Applications`. This is done by using `GIT_CONFIG_NOSYSTEM`, which suppresses both the system scope and this separate "unknown" scope, instead of by settng `GIT_CONFIG_SYSTEM` to a path like `/dev/null`. The latter approach continues to be used to omit global scope config via `GIT_CONFIG_GLOBAL` (as `git` recognized no `GIT_CONFIG_NOGLOBAL`).
1 parent d576b32 commit a879d22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎tests/tools/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ fn configure_command<'a>(
603603
.env_remove("GIT_ASKPASS")
604604
.env_remove("SSH_ASKPASS")
605605
.env("MSYS", msys_for_git_bash_on_windows)
606-
.env("GIT_CONFIG_SYSTEM", NULL_DEVICE)
606+
.env("GIT_CONFIG_NOSYSTEM", "1")
607607
.env("GIT_CONFIG_GLOBAL", NULL_DEVICE)
608608
.env("GIT_TERMINAL_PROMPT", "false")
609609
.env("GIT_AUTHOR_DATE", "2000-01-01 00:00:00 +0000")

0 commit comments

Comments
 (0)
Please sign in to comment.