Add git submodules support to github linking #1270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR adds support for generating github links when running
documentation
on a git submodule (rather than a standalone repo). As an example, this will enable cutting out GL JS docs into its own repo that pullsmapbox-gl-js
source as a submodule.I had to do some refactoring to support this — e.g.
findGit
will now return two values, one pointing to the repo root, and the other one to the.git
folder, which for a submodule will look likeparent_repo/.git/modules/foo
rather thanrepo/.git
(we can't derive the root from the latter).