]> git.ipfire.org Git - thirdparty/git.git/commit
init: do parse _all_ core.* settings early
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 9 Jan 2026 20:05:06 +0000 (20:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 10 Jan 2026 02:28:36 +0000 (18:28 -0800)
commit7997e36561b9f7c084ea37ec280708736ab3dcb4
tree7f953f28cfeeacca0414b2f62be92b60650b5a70
parentf0af8b4aae3397d6bbe68a3c09f558cab983eaff
init: do parse _all_ core.* settings early

In Git for Windows, `has_symlinks` is set to 0 by default. Therefore, we
need to parse the config setting `core.symlinks` to know if it has been
set to `true`. In `git init`, we must do that before copying the
templates because they might contain symbolic links.

Even if the support for symbolic links on Windows has not made it to
upstream Git yet, we really should make sure that all the `core.*`
settings are parsed before proceeding, as they might very well change
the behavior of `git init` in a way the user intended.

This fixes https://github.com/git-for-windows/git/issues/3414

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c
environment.h
setup.c