Skip to content

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.

2 participants