Browse Source

Make negative author timedelta positive.

Commit timestamps can be in backwards order (when applying patches &
cherry-picking in reverse order), so we don't want author age to be negative
(was in gitstats case too :)
Heikki Hokkanen 15 years ago
parent
commit
19588b9302
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      gitstats

+ 1
- 1
gitstats View File

523
 			delta = date_last - date_first
523
 			delta = date_last - date_first
524
 			a['date_first'] = date_first.strftime('%Y-%m-%d')
524
 			a['date_first'] = date_first.strftime('%Y-%m-%d')
525
 			a['date_last'] = date_last.strftime('%Y-%m-%d')
525
 			a['date_last'] = date_last.strftime('%Y-%m-%d')
526
-			a['timedelta'] = delta
526
+			a['timedelta'] = abs(delta)
527
 			if 'lines_added' not in a: a['lines_added'] = 0
527
 			if 'lines_added' not in a: a['lines_added'] = 0
528
 			if 'lines_removed' not in a: a['lines_removed'] = 0
528
 			if 'lines_removed' not in a: a['lines_removed'] = 0
529
 	
529