From ca7cd83085e73829ee656bd56208b6fe2148eb70 Mon Sep 17 00:00:00 2001 From: Alejandro Barreto Date: Fri, 9 Mar 2018 14:17:54 -0600 Subject: [PATCH] Document how $HOME is set on Windows Git documentation refers to $HOME and $XDG_CONFIG_HOME often, but does not specify how or where these values come from on Windows where neither is set by default. The new documentation reflects the behavior of setup_windows_environment() in compat/mingw.c. Signed-off-by: Alejandro Barreto --- Documentation/git.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/git.txt b/Documentation/git.txt index 0c15ef3a8e6a51..455eaf0489a226 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -460,6 +460,14 @@ Environment Variables --------------------- Various Git commands use the following environment variables: +System +~~~~~~ +`HOME`:: + Specifies the path to the user's home directory. On Windows, if + unset, Git will set a process environment variable equal to: + `$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist; + otherwise `$USERPROFILE` if `$USERPROFILE` exists. + The Git Repository ~~~~~~~~~~~~~~~~~~ These environment variables apply to 'all' core Git commands. Nb: it