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
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment