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

Fix git submodule tests using file: protocol #159

Merged
merged 6 commits into from Oct 22, 2022

Conversation

mgedmin
Copy link
Owner

@mgedmin mgedmin commented Oct 22, 2022

Git 2.30.6 (and 2.31.5, and 2.32.4, and 2.33.5, and 2.34.5, and 2.35.5, and 2.36.3, and 2.37.4, and 2.38.1, and I suppose the forthcoming 2.39.0) forbids file:// protocols by default for git submodules, as a security measure.

See git/git@a1d4f67 for details.

No Ubuntu version ships a Git with that patch, so it's hard for me to test the fix locally.

Suppresses

    hint: Using 'master' as the name for the initial branch. This default branch name
    hint: is subject to change. To configure the initial branch name to use in all
    hint: of your new repositories, which will suppress this warning, call:
    hint:
    hint:   git config --global init.defaultBranch <name>
    hint:
    hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
    hint: 'development'. The just-created branch can be renamed via this command:
    hint:
    hint:   git branch -m <name>

This requires Git 2.28 or newer.
git init -b/--initial-branch was added in git 2.28.
Git 2.30.6 (and 2.31.5, and 2.32.4, and 2.33.5, and 2.34.5, and 2.35.5,
and 2.36.3, and 2.37.4, and 2.38.1, and I suppose the forthcoming 2.39.0)
forbids file:// protocols by default for git submodules, as a security
measure.

See git/git@a1d4f67
for details.
If we set the environment variable maybe we won't need to pass the -c to
multiple commands.

(The previous workaround fixed the git submodule add, but git submodule
update --init --recursive remained broken).
@mgedmin mgedmin merged commit 7b8c279 into master Oct 22, 2022
@mgedmin mgedmin deleted the fix-git-submodule-tests-using-file-protocol branch October 22, 2022 10:23
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.

None yet

1 participant