git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Document HOME environment variable

From
M Hickford via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 9, 2024, 19:18 UTC
Message-ID
<pull.1834.git.1733771894867.gitgitgadget@gmail.com>
From: Alejandro Barreto <alejandro.barreto@ni.com>

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>
---
    Document how $HOME is set on Windows
    
    CC: Alejandro Barreto alejandro.barreto@ni.com, Johannes Schindelin
    johannes.schindelin@gmx.de
    
    Fixes https://github.com/git-for-windows/git/issues/5282
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1834%2Fhickford%2Fhome-docs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1834/hickford/home-docs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1834
 Documentation/git.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index d15a8697625..47509c9e1a3 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -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

base-commit: cc01bad4a9f566cf4453c7edd6b433851b0835e2
-- 
gitgitgadget
Next: Junio C Hamano
Message 1 of 4 in “Document HOME environment variable”
  1. Document HOME environment variableM Hickford via GitGitGadget, Dec 9, 2024
  2. Junio C HamanoDec 9, 2024
  3. Johannes SixtDec 10, 2024
  4. Junio C HamanoDec 10, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.