initialize

in lib/gitlab_git/commit_stats.rb [8:23]


      def initialize(commit)
        @id = commit.id
        @additions = 0
        @deletions = 0
        @total = 0

        diff = commit.diff_from_parent

        diff.each_patch do |p|
          
          @additions += p.stat[0]
          @deletions += p.stat[1]
          @total += p.changes
        end
      end