Skip to content
Permalink
Browse files

Docs: Fix automatic author list generation for Read The Docs

Read The Docs runs the build process without an attached terminal
(reasonably so), which changes git shortlog's default behaviour when no
revisions are specified.  Instead of defaulting to HEAD, it reads commit
messages from stdin.  No input was redirected to stdin, so git shortlog
read nothing and exited without error, thus silently failing to do our
intent.  This behaviour is documented by git shortlog's manpage, but I
wasn't aware of it.

The fix is to explicitly ask for a shortlog starting from the currently
checked out commit (HEAD), which works as expected regardless of stdin.
  • Loading branch information...
tsibley committed May 28, 2019
1 parent 3d81b49 commit a8791229ee7e54224f112f2bbdf529a20bafbafb
Showing with 1 addition and 1 deletion.
  1. +1 −1 docs/conf.py
@@ -22,7 +22,7 @@

def git_authors():
result = subprocess.run(
["git", "shortlog", "--summary"],
["git", "shortlog", "--summary", "HEAD"],
stdout = subprocess.PIPE,
check = True)

0 comments on commit a879122

Please sign in to comment.
You can’t perform that action at this time.