Sha256: 6b8a47c3180eae61a4ad0bd056a852b9aa65ed58b4a26b5fb1f9e33ab177afd8
Contents?: true
Size: 671 Bytes
Versions: 4
Compression:
Stored size: 671 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 log = nil Grit::Git.with_timeout(30) do # Limit log to 6k commits to avoid timeout for huge projects args = ['-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
4 entries across 4 versions & 1 rubygems