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

GH-576: Fix relative submodule URL handling. #583

Closed
wants to merge 1 commit into from
Closed

GH-576: Fix relative submodule URL handling. #583

wants to merge 1 commit into from

Conversation

Zastai
Copy link

@Zastai Zastai commented Feb 22, 2020

They should be resolved against the main repository's URL, not the working directory.

@Zastai
Copy link
Author

Zastai commented Feb 22, 2020

An alternative might be to ignore the URL in .gitmodules, and instead use the branch specification to get the repository url from the module's own config file, if it exists.

@Zastai
Copy link
Author

Zastai commented Feb 22, 2020

Currently I essentially inlined a NormalizeUrl overload, tweaking the root path argument.
It may be more desirable to create another overload (or a NormalizeSubmoduleUrl() method) instead.

They should be resolved against the main repository's URL, not the working directory.
@Zastai
Copy link
Author

Zastai commented Feb 22, 2020

(Update: restored accidentally-removed whitespace, and corrected the issue name in a comment.)

@tmat
Copy link
Member

tmat commented Mar 1, 2020

Thanks for the proposed change. I see what the problem is now. I think however that we need to check submodule.<name>.url configuration variable to find the URL for the submodule (see https://git-scm.com/docs/gitsubmodules). This variable is calculated based on the entry in .gitmodules by git submodule init and will be present for initialized submodules. We can skip uninitialized submodules as they won't have source code contributing to the build anyways. I'm gonna send a PR implementing this approach.

@tmat
Copy link
Member

tmat commented Mar 1, 2020

Superseded by #587.

@tmat tmat closed this Mar 1, 2020
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

2 participants