Sha256: 58cd34dca7d9898c180c4a539b5e2eda1d57d043812235e4b0bcb6fdddc1246e

Contents?: true

Size: 471 Bytes

Versions: 5

Compression:

Stored size: 471 Bytes

Contents

require_relative 'log_parser'

module Gitlab
  module Git
    class GitStats
      attr_accessor :repo, :ref

      def initialize repo, ref
        @repo, @ref = repo, ref
      end

      def log
        args = ['--format=%aN%x0a%ad', '--date=short', '--shortstat', '--no-merges']
        repo.git.run(nil, 'log', nil, {}, args)
      rescue Grit::Git::GitTimeout
        nil
      end

      def parsed_log
        LogParser.parse_log(log)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gitlab_git-1.3.1 lib/gitlab_git/git_stats.rb
gitlab_git-2.0.0.pre lib/gitlab_git/git_stats.rb
gitlab_git-1.4.1 lib/gitlab_git/git_stats.rb
gitlab_git-1.4.0 lib/gitlab_git/git_stats.rb
gitlab_git-1.3.0 lib/gitlab_git/git_stats.rb