mirror of https://github.com/tomgi/git_stats.git
changed way to calculate lines_count_by_date
This commit is contained in:
parent
0484ec844c
commit
33df12e025
|
@ -56,8 +56,11 @@ module GitStats
|
|||
end
|
||||
|
||||
def lines_count_by_date
|
||||
@lines_count_each_day ||= Hash[commits.map { |commit|
|
||||
[commit.date, commit.lines_count]
|
||||
sum = 0
|
||||
Hash[commits.map { |commit|
|
||||
sum += commit.short_stat.insertions
|
||||
sum -= commit.short_stat.deletions
|
||||
[commit.date, sum]
|
||||
}]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue