diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2026-01-09 20:05:06 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-01-09 18:28:36 -0800 |
| commit | 7997e36561b9f7c084ea37ec280708736ab3dcb4 (patch) | |
| tree | 7f953f28cfeeacca0414b2f62be92b60650b5a70 /environment.h | |
| parent | f0af8b4aae3397d6bbe68a3c09f558cab983eaff (diff) | |
| download | git-7997e36561b9f7c084ea37ec280708736ab3dcb4.tar.xz | |
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>
Diffstat (limited to 'environment.h')
| -rw-r--r-- | environment.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/environment.h b/environment.h index 51898c99cd..e61f843fdb 100644 --- a/environment.h +++ b/environment.h @@ -106,6 +106,8 @@ const char *strip_namespace(const char *namespaced_ref); int git_default_config(const char *, const char *, const struct config_context *, void *); +int git_default_core_config(const char *var, const char *value, + const struct config_context *ctx, void *cb); /* * TODO: All the below state either explicitly or implicitly relies on |
