Re: [PATCH v2] t/README: the test repo does not have global or system configs
From: Junio C Hamano <hidden>
Date: 2019-10-21 03:55:26
Philip Oakley [off-list ref] writes:
quoted hunk
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 899e92a1c9..d4c792076d 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt@@ -107,7 +107,7 @@ OPTIONS For writing options: write to global `~/.gitconfig` file rather than the repository `.git/config`, write to `$XDG_CONFIG_HOME/git/config` file if this file exists and the - `~/.gitconfig` file doesn't. + `~/.gitconfig` file if it doesn't.
The original is not easy to read, but this is not that much of an
improvement. I think what the original wants to say is
- write to global `~/.gitconfig`
- but write to the XDG place instead, if XDG one exists and
~/.gitconfig does not exist
How about touching a bit more, e.g.
For writing, rather than writing the per-repository config
file .git/config, write to the global config file, which is
$XDG_CONFIG_HOME/git/config (if it exists), or
$HOME/.gitconfig (otherwise).
to streamline the description?
quoted hunk
diff --git a/t/README b/t/README index 60d5b77bcc..71946902d7 100644 --- a/t/README +++ b/t/README@@ -485,6 +485,13 @@ This test harness library does the following things: the --root option documented above, and a '.stress-<N>' suffix appended by the --stress option. + - The test framework sets GIT_CONFIG_NOSYSTEM=1, thus ignoring any + --system config files. The --global config is redirected through + the environment variables. It unsets the $XDG_CONFIG_HOME variable + and sets HOME="$TRASH_DIRECTORY" for the tests. + A basic --local config is created in the test repository. + See linkgit:git-config[1].
Correct, even though I would say s/thus ignoring/in order to ignore/ instead ;-) Thanks.