From: Junio C Hamano <gitster@pobox.com>
To: "M Hickford via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, M Hickford <mirth.hickford@gmail.com>,
Alejandro Barreto <alejandro.barreto@ni.com>
Subject: Re: [PATCH] Document HOME environment variable
Date: Tue, 10 Dec 2024 08:47:40 +0900 [thread overview]
Message-ID: <xmqqwmg8mnab.fsf@gitster.g> (raw)
In-Reply-To: <pull.1834.git.1733771894867.gitgitgadget@gmail.com> (M. Hickford via GitGitGadget's message of "Mon, 09 Dec 2024 19:18:14 +0000")
"M Hickford via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 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.
Makes sense. As long as the logic to make this fallback is in my
tree (as opposed to being implemented by a set of GfW/minGit add-on
patches), its documentation should also be in my tree.
Will queue.
> +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.
I wondered what the reaction by the readers on non-Windows would be,
but hopefully they would read this to mean that HOME will not be
mucked with, even if they leave it unset (or they take it granted
that HOME is set somewhere while they log in and they do not have to
worry about it), so it may be OK.
Just out of curiousity, is Git the only thing that uses $HOME on
Windows? Or among may other programs on Windows that use $HOME, is
the way Git gives a fall-back value out of these three variables
unusual and deserves documentation?
Thanks.
next prev parent reply other threads:[~2024-12-09 23:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 19:18 [PATCH] Document HOME environment variable M Hickford via GitGitGadget
2024-12-09 23:47 ` Junio C Hamano [this message]
2024-12-10 8:01 ` Johannes Sixt
2024-12-10 9:20 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwmg8mnab.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=alejandro.barreto@ni.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=mirth.hickford@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).