Skip to content

submodule to parent repo link does not work if submodule is not in root folder #577

Description

@campersau

From #556 (comment)
If a submodule is not in the root folder of the parent repo then the link to the parent repo is not visible.

This line replaces too much. Maybe something like this is better (not tested):

var currentSubmodulePath = self.repoPath.substring(baseRepoPath.path.length);

for (var n = 0; n < submodules.length; n++) {
    if (currentSubmodulePath.indexOf(submodules[n].path) === 0) {
        self.isSubmodule(true);
        self.parentModulePath(baseRepoPath.path);
        self.parentModuleLink('/#/repository?path=' + encodeURIComponent(baseRepoPath.path));
        return;
    }
}

(Note: there might also be issues with windows backslash (\) path seperators)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions