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

SubmoduleAlternateRemotes on Linux #265

Open
ndhaller opened this issue Nov 27, 2024 · 0 comments
Open

SubmoduleAlternateRemotes on Linux #265

ndhaller opened this issue Nov 27, 2024 · 0 comments

Comments

@ndhaller
Copy link
Contributor

Testing the edkrepo SubmoduleAlternateRemotes section as a workaround for checking out old Tianocore Edk2 stable tags that were impacted by the submodule removal, but don't have the commit workaround.

commit workaround:
tianocore/edk2@95d8a1c

edkrepo workaround:

  <SubmoduleAlternateRemotes>
    <SubmoduleAlternateRemote originalUrl="https://github.com/Zeex/subhook.git" remote="Edk2Repo">https://github.com/tianocore/edk2-subhook.git</SubmoduleAlternateRemote>
  </SubmoduleAlternateRemotes>

Part of this feature calls edkrepo write_conditional_include() function to add includeIf to the global .gitconfig file.
The syntax used is different for GitVersion('2.34.0') and later, adding the addition of '%(prefix)' to the includeIf and path.
https://github.com/tianocore/edk2-edkrepo/blob/main/edkrepo/common/common_repo_functions.py#L180-L202

git version 2.43.0.windows.1 on Windows 11, the feature is functioning fine.

git 2.47 in Linux and git version 2.39.5 in Linux there is a report that '%(prefix)' is preventing the includeIf from functioning, and the original subhook URL is still attempted to be used.

alternate Linux system workaround, if cloning an edkrepo project that uses SubmoduleAlternateRemotes for old Tianocore Edk2 repo stable tags, configure the url insteadof setting globally before cloning the edkrepo project.

git config --global url."https://github.com/tianocore/edk2-subhook.git".insteadof "https://github.com/Zeex/subhook.git"
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

No branches or pull requests

1 participant