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

Commits on Oct 22, 2022

  1. Suppress git warnings about default branch name

    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.
    mgedmin committed Oct 22, 2022
    Copy the full SHA
    e085dca View commit details
    Browse the repository at this point in the history
  2. Restore support for git < 2.28 by checking version number

    git init -b/--initial-branch was added in git 2.28.
    mgedmin committed Oct 22, 2022
    Copy the full SHA
    d281624 View commit details
    Browse the repository at this point in the history
  3. Fix tests for modern Git that forbids file:// by default

    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.
    mgedmin committed Oct 22, 2022
    Copy the full SHA
    b329582 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    227fb10 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    3fc1989 View commit details
    Browse the repository at this point in the history
  6. Try a different workaround

    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 committed Oct 22, 2022
    Copy the full SHA
    1ce75c4 View commit details
    Browse the repository at this point in the history