]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Document HOME environment variable
authorAlejandro Barreto <alejandro.barreto@ni.com>
Mon, 9 Dec 2024 19:18:14 +0000 (19:18 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Dec 2024 23:47:55 +0000 (08:47 +0900)
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 <alejandro.barreto@ni.com>
Signed-off-by: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git.txt

index d15a8697625d6b6c598a2bc774bf243675ab68ea..47509c9e1a3d1e303f18874be358883f6e46a3cc 100644 (file)
@@ -477,6 +477,14 @@ their values the same way as Boolean valued configuration variables, e.g.
 
 Here are the 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