|
|
@@ -475,10 +475,11 @@ class GitDataCollector(DataCollector):
|
|
475
|
475
|
# Similar to the above, but never use --first-parent
|
|
476
|
476
|
# (we need to walk through every commit to know who
|
|
477
|
477
|
# committed what, not just through mainline)
|
|
478
|
|
- lines = getpipeoutput(['git log --shortstat --pretty=format:"%%at %%aN" %s' % (getcommitrange('HEAD'))]).split('\n')
|
|
|
478
|
+ lines = getpipeoutput(['git log --shortstat --date-order --pretty=format:"%%at %%aN" %s' % (getcommitrange('HEAD'))]).split('\n')
|
|
479
|
479
|
lines.reverse()
|
|
480
|
480
|
files = 0; inserted = 0; deleted = 0
|
|
481
|
481
|
author = None
|
|
|
482
|
+ stamp = 0
|
|
482
|
483
|
for line in lines:
|
|
483
|
484
|
if len(line) == 0:
|
|
484
|
485
|
continue
|
|
|
@@ -488,7 +489,11 @@ class GitDataCollector(DataCollector):
|
|
488
|
489
|
pos = line.find(' ')
|
|
489
|
490
|
if pos != -1:
|
|
490
|
491
|
try:
|
|
|
492
|
+ oldstamp = stamp
|
|
491
|
493
|
(stamp, author) = (int(line[:pos]), line[pos+1:])
|
|
|
494
|
+ if oldstamp > stamp:
|
|
|
495
|
+ # clock skew, keep old timestamp to avoid having ugly graph
|
|
|
496
|
+ stamp = oldstamp
|
|
492
|
497
|
if author not in self.authors:
|
|
493
|
498
|
self.authors[author] = { 'lines_added' : 0, 'lines_removed' : 0, 'commits' : 0}
|
|
494
|
499
|
self.authors[author]['commits'] = self.authors[author].get('commits', 0) + 1
|