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:
Heikki Hokkanen 2007-09-06 10:47:20 +03:00
parent 3ffee5fce8
commit 4274e58ac8
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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: