-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
init: respect core.symlinks before copying the templates #3417
init: respect core.symlinks before copying the templates #3417
Conversation
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 git-for-windows#3414 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Like `git init`, we also want to parse `core.symlinks` in the other built-ins like `git clone`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@@ -990,7 +990,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) | |||
struct transport_ls_refs_options transport_ls_refs_options = | |||
TRANSPORT_LS_REFS_OPTIONS_INIT; | |||
|
|||
git_config(platform_core_config, NULL); | |||
git_config(git_default_core_config, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this is a fixup!
, but depends on the previous commit. I assume you'll remember to reorder the commits in the next rebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. The individual commit needs to go to the Git mailing list early, I think. Or maybe we should combine it with contributing the symlink support (but that's a bigger task as those patches are entangled with the longPaths and the FSCache topics).
I was surprised by Git v2.33.1 being released last night, and hoped to get this PR in, but not without using it as an excuse for a snapshot that includes the new GCM Core version. It's all a bit unfortunate right now, but I think I will have to hold off Git for Windows v2.33.1 until a few still-moving parts have moved into place. |
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
…mlinks-earlier init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
…mlinks-earlier init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
…mlinks-earlier init: respect core.symlinks before copying the templates
init: respect core.symlinks before copying the templates
Tentative fix for #3414.