mirror of
https://github.com/blender/blender
synced 2026-09-27 19:44:35 +03:00
Tools: Make git credits stable when sorted by commits
Only sorting by the number of commits was unstable when authors had the same number of commits. Make the output stable by including the name in the sort "key". Ref !149460
This commit is contained in:
parent
3b83d75c4e
commit
2c9fd6752e
1 changed files with 4 additions and 2 deletions
|
|
@ -216,9 +216,11 @@ class Credits:
|
|||
) -> None:
|
||||
commit_word = "commit", "commits"
|
||||
|
||||
sorted_authors = {}
|
||||
if sort == "commit":
|
||||
sorted_authors = dict(sorted(self.users.items(), key=lambda item: item[1].commit_total))
|
||||
sorted_authors = dict(sorted(
|
||||
self.users.items(),
|
||||
key=lambda item: (item[1].commit_total, item[0]),
|
||||
))
|
||||
else:
|
||||
sorted_authors = dict(sorted(self.users.items()))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue