|
|
@@ -85,9 +85,15 @@ class GitDataCollector(DataCollector):
|
|
85
|
85
|
# TODO also collect statistics for "last 30 days"/"last 12 months"
|
|
86
|
86
|
lines = getoutput('git-rev-list --pretty=format:"%at %an" HEAD |grep -v ^commit').split('\n')
|
|
87
|
87
|
for line in lines:
|
|
|
88
|
+ # linux-2.6 says "<unknown>" for one line O_o
|
|
88
|
89
|
parts = line.split(' ')
|
|
89
|
|
- stamp = int(parts[0])
|
|
90
|
|
- author = ' '.join(parts[1:])
|
|
|
90
|
+ author = ''
|
|
|
91
|
+ try:
|
|
|
92
|
+ stamp = int(parts[0])
|
|
|
93
|
+ except ValueError:
|
|
|
94
|
+ stamp = 0
|
|
|
95
|
+ if len(parts) > 1:
|
|
|
96
|
+ author = ' '.join(parts[1:])
|
|
91
|
97
|
date = datetime.datetime.fromtimestamp(float(stamp))
|
|
92
|
98
|
|
|
93
|
99
|
# First and last commit stamp
|