Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sphinx_git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class GitChangelog(GitDirectiveBase):
'hide_author': bool,
'hide_date': bool,
'hide_details': bool,
'hide_merge_commit': bool,
'repo-dir': six.text_type,
}

Expand Down Expand Up @@ -168,6 +169,10 @@ def _filter_commits_on_filenames(self, commits):
def _build_markup(self, commits):
list_node = nodes.bullet_list()
for commit in commits:
if self.options.get('hide_merge_commit'):
if len(commit.parents) > 1:
continue

date_str = datetime.fromtimestamp(commit.authored_date)
if '\n' in commit.message:
message, detailed_message = commit.message.split('\n', 1)
Expand Down