Skip to content
Snippets Groups Projects
Commit b66c22e1 authored by Sebastián Barschkis's avatar Sebastián Barschkis
Browse files

Credits: Fix duplicate credit users

Normalization ensures correct grouping of names with special chars.
parent c37d8bd2
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ Example use:
"""
from git_log import GitCommit, GitCommitIter
import unicodedata as ud
# -----------------------------------------------------------------------------
# Class for generating credits
......@@ -52,7 +52,8 @@ class Credits:
self.users = {}
def process_commit(self, c):
author = c.author
# Normalize author string into canonical form, prevents duplicate credit users
author = ud.normalize('NFC', c.author)
year = c.date.year
cu = self.users.get(author)
if cu is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment