Sha256: a40d44f0b2deb045a048c975b21ede3e5ce334294bbce3f09134507e9bc220a0
Contents?: true
Size: 725 Bytes
Versions: 15
Compression:
Stored size: 725 Bytes
Contents
require_relative 'log_parser' module Gitlab module Git class GitStats attr_accessor :repo, :ref, :timeout def initialize(repo, ref, timeout = 30) @repo, @ref, @timeout = repo, ref, timeout end def log log = nil Grit::Git.with_timeout(timeout) do # Limit log to 6k commits to avoid timeout for huge projects args = [ref, '-6000', '--format=%aN%x0a%aE%x0a%cd', '--date=short', '--shortstat', '--no-merges', '--diff-filter=ACDM'] log = repo.git.run(nil, 'log', nil, {}, args) end log rescue Grit::Git::GitTimeout nil end def parsed_log LogParser.parse_log(log) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems