Portability: use python's reverse() instead of |tac.
This should make gitstats work on FreeBSD. Thanks to Alexander Botero-Lowry.
This commit is contained in:
parent
3ffee5fce8
commit
4274e58ac8
@ -1,2 +1,8 @@
|
||||
Author can be reached by sending e-mail to <hoxu@users.sf.net>.
|
||||
Include "gitstats" in the subject or prepare to battle the spam filters.
|
||||
|
||||
Also thanks to the following people:
|
||||
Alexander Botero-Lowry
|
||||
|
||||
See also:
|
||||
$ git-shortlog HEAD
|
||||
|
3
gitstats
3
gitstats
@ -259,7 +259,8 @@ class GitDataCollector(DataCollector):
|
||||
# N files changed, N insertions (+), N deletions(-)
|
||||
# <stamp> <author>
|
||||
self.changes_by_date = {} # stamp -> { files, ins, del }
|
||||
lines = getoutput('git-log --shortstat --pretty=format:"%at %an" |tac').split('\n')
|
||||
lines = getoutput('git-log --shortstat --pretty=format:"%at %an"').split('\n')
|
||||
lines.reverse()
|
||||
files = 0; inserted = 0; deleted = 0; total_lines = 0
|
||||
for line in lines:
|
||||
if len(line) == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user