# Gitlab::Git::CommitStats counts the additions, deletions, and total changes# in a commit.moduleGitlabmoduleGitclassCommitStatsattr_reader:id,:additions,:deletions,:total# Instantiate a CommitStats objectdefinitialize(commit)@id=commit.id@additions=0@deletions=0@total=0diff=commit.diff_from_parentdiff.each_patchdo|p|# TODO: Use the new Rugged convenience methods when they're released@additions+=p.stat[0]@deletions+=p.stat[1]@total+=p.changesendendendendend