4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-27 01:27:21 +08:00
Johannes Schindelin 27376c60a9 Allow deriving the current user's home directory via the HOME variable
This patch hails from Git for Windows (where the Cygwin runtime is used
in the form of a slightly modified MSYS2 runtime), where it is a
well-established technique to let the `$HOME` variable define where the
current user's home directory is, falling back to `$HOMEDRIVE$HOMEPATH`
and `$USERPROFILE`.

The idea is that we want to share user-specific settings between
programs, whether they be Cygwin, MSYS2 or not.  Unfortunately, we
cannot blindly activate the "db_home: windows" setting because in some
setups, the user's home directory is set to a hidden directory via an
UNC path (\\share\some\hidden\folder$) -- something many programs
cannot handle correctly, e.g. `cmd.exe` and other native Windows
applications that users want to employ as Git helpers.

The established technique is to allow setting the user's home directory
via the environment variables mentioned above: `$HOMEDRIVE$HOMEPATH` or
`$USERPROFILE`.  This has the additional advantage that it is much
faster than querying the Windows user database.

Of course this scheme needs to be opt-in.  For that reason, it needs
to be activated explicitly via `db_home: env` in `/etc/nsswitch.conf`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2023-03-28 12:18:14 +02:00
..
2015-03-09 21:40:26 +01:00
2013-07-25 09:09:14 +00:00
2017-12-05 17:58:02 +01:00
2021-07-30 15:48:26 +01:00
2021-08-02 13:57:03 +02:00
.
2013-05-23 19:03:19 +00:00

ADDITIONAL BUILD REQUIREMENTS FOR DOCUMENTATION

dblatex
docbook-xml45
docbook-xsl
docbook2x-texi
gzip
texinfo
xmlto