Skip to content

Commit 190852f

Browse files
tracernzmlyle
authored andcommitted
Tools: Fix authors functions in version-info.py (#1617)
Thanks to @mlyle for figuring this out
1 parent 3fc213c commit 190852f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

make/scripts/version-info.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def _get_dirty(self):
104104
self._dirty = True
105105

106106
def _get_authors_since_release(self):
107+
"""Get list of authors since the last full release tag (.n are ignored)"""
107108
self._authors_since_release = []
108109
self._exec('show-ref --tags')
109110
pat = re.compile('^refs/tags/(?P<type>[A-Za-z]*)\-(?P<rel>(?P<date>[0-9]{8})(\.(?P<suffix>[0-9]*))?)$')
@@ -138,11 +139,12 @@ def _get_authors_since_release(self):
138139

139140
self._exec('shortlog -s {}..HEAD'.format(last_rel['ref']))
140141
if self._rc == 0:
141-
self._authors_since_release = sorted([l.strip().split('\t', 1)[1] for l in self._out.splitlines()], key=str.lower)
142+
self._authors_since_release = sorted([l.strip().split(None, 1)[1] for l in self._out.splitlines()], key=str.lower)
142143

143144
def _get_authors(self):
145+
"""Get all-time list of authors sorted by contributions"""
144146
self._authors = []
145-
self._exec('shortlog -sn')
147+
self._exec('shortlog -sn HEAD')
146148
if self._rc == 0:
147149
self._authors = [l.strip().split(None, 1)[1] for l in self._out.splitlines()]
148150

0 commit comments

Comments
 (0)