Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
19588b9302
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      gitstats

+ 1
- 1
gitstats Dosyayı Görüntüle

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