From bfd6afb21cb0321edbd4f1fcc8678669761f5d3c Mon Sep 17 00:00:00 2001 From: mccaffrey-jonathan Date: Thu, 29 Jul 2021 00:32:06 -0400 Subject: [PATCH] sphinx_git: add 'repo-dir' in option_spec of GitCommitDetail Add 'repo-dir' option in the option_spec of GitCommitDetail class. GitCommitDetail extends class GitDirectiveBase. GitDirectiveBase base class checks for 'repo-dir' option, with an environment default. 'repo-dir' option previously is in option_spec of GitChangelog but not of GitCommitDetail. If 'repo-dir' option is added to the option_spec, that option becomes functional for GitCommitDetail because the option is queried in GitDirectiveBase. 1 use of 'repo-dir' option with GitCommitDetail is to embed the git revision (by commit SHA) of a neighboring git repository which is documented by the Sphinx documents, importing doxygen comments from that neighboring git repository by Breathe extension. --- sphinx_git/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sphinx_git/__init__.py b/sphinx_git/__init__.py index 958e189..b639e76 100644 --- a/sphinx_git/__init__.py +++ b/sphinx_git/__init__.py @@ -42,6 +42,7 @@ class GitCommitDetail(GitDirectiveBase): 'untracked': bool, 'sha_length': int, 'no_github_link': bool, + 'repo-dir': six.text_type, } # pylint: disable=attribute-defined-outside-init