use the --no-rename option to git statistics to match the expected insertions/deletions in spec tests; useful for test success on os x

This commit is contained in:
Neil Spring 2016-11-14 15:21:13 -05:00
parent 1608a43e8d
commit c5361bae49

View file

@ -41,7 +41,7 @@ module GitStats
end
def lines_count
@lines_count ||= repo.run("git diff --shortstat `git hash-object -t tree /dev/null` #{self.sha} -- #{repo.tree_path}").lines.map do |line|
@lines_count ||= repo.run("git diff --shortstat --no-renames `git hash-object -t tree /dev/null` #{self.sha} -- #{repo.tree_path}").lines.map do |line|
line[/(\d+) insertions?/, 1].to_i
end.sum
end