Skip to content

Commit 5c2936a

Browse files
author
Christian Knittl-Frank
committed
Fix scm contributors not showing
kudos to GianlucaFicarelli (gitpython-developers/GitPython#1434 (comment))
1 parent 304d744 commit 5c2936a

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/sphinxcontrib/scm/util.py

+11-5
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,27 @@ def get_contributors(self) -> list[str]:
4747
self.option_over_conf("email", "scm_contribs_email"),
4848
("true", "false"),
4949
)
50-
flags += ["-e"] if contribs_email == "true" else []
50+
flags += ["--email"] if contribs_email == "true" else ["--no-email"]
5151

5252
contribs_sort = directives.choice(
5353
self.option_over_conf("sort", "scm_contribs_sort"),
5454
("name", "num"),
5555
)
56-
flags += ["-n"] if contribs_sort == "num" else []
56+
flags += ["--numbered"] if contribs_sort == "num" else ["--no-numbered"]
5757

5858
contribs_type = directives.choice(
5959
self.option_over_conf("type", "scm_contribs_type"),
6060
("author", "committer"),
6161
)
62-
flags += ["-c"] if contribs_type == "committer" else []
63-
64-
git_shortlog_options = ["-s", *flags, "--", docfile_name]
62+
flags += ["--committer"] if contribs_type == "committer" else ["--no-committer"]
63+
64+
git_shortlog_options = [
65+
"--summary",
66+
*flags,
67+
"HEAD",
68+
"--",
69+
docfile_name,
70+
]
6571

6672
contributors = []
6773
git_shortlog = Git(docdir_path).shortlog(*git_shortlog_options)

0 commit comments

Comments
 (0)