Skip to content
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

Merged
merged 2 commits into from
Oct 13, 2021

Conversation

dscho
Copy link
Member

@dscho dscho commented Sep 8, 2021

Tentative fix for #3414.

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);

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?

Copy link
Member Author

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).

@dscho dscho added this to the Next release milestone Oct 13, 2021
@dscho
Copy link
Member Author

dscho commented Oct 13, 2021

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.

@dscho dscho mentioned this pull request Oct 13, 2021
@dscho dscho merged commit 0055932 into git-for-windows:main Oct 13, 2021
@dscho dscho deleted the initialize-core.symlinks-earlier branch October 13, 2021 14:47
git-for-windows-ci pushed a commit that referenced this pull request Oct 13, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 13, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 13, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 13, 2021
init: respect core.symlinks before copying the templates
dscho added a commit to dscho/git that referenced this pull request Oct 13, 2021
…mlinks-earlier

init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 13, 2021
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 13, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 13, 2021
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 14, 2021
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 15, 2021
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 15, 2021
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 15, 2021
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 20, 2024
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 20, 2024
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 21, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 21, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 21, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 22, 2024
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Oct 23, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 25, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 25, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 25, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Oct 30, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Nov 1, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Nov 6, 2024
init: respect core.symlinks before copying the templates
dscho added a commit to dscho/git that referenced this pull request Nov 12, 2024
…mlinks-earlier

init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Nov 22, 2024
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Nov 22, 2024
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Nov 22, 2024
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Nov 22, 2024
init: respect core.symlinks before copying the templates
dscho added a commit that referenced this pull request Nov 22, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Nov 25, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Nov 25, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Nov 25, 2024
init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Nov 25, 2024
init: respect core.symlinks before copying the templates
dscho added a commit to dscho/git that referenced this pull request Nov 25, 2024
…mlinks-earlier

init: respect core.symlinks before copying the templates
git-for-windows-ci pushed a commit that referenced this pull request Nov 25, 2024
init: respect core.symlinks before copying the templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants