gitlab_git 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gitlab_git/git_stats.rb +8 -3
- data/lib/gitlab_git/log_parser.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6153bb71b711454165303016cafd44943691bcf6
|
4
|
+
data.tar.gz: 05faffaaa0c4346fbfda09b80d24692044c7a3c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae2038afe8f25b18e141969b0099ea3d64fcca4475bfd287f1bc5fd7089c5ee3092d7e36e2191d633b89546c2d6ac941090d7f8ee3198fe1b23e2e7d1af93066
|
7
|
+
data.tar.gz: 190841dbc36231e05a999fb3c6f4a848d4e6d5d8d51b85925e3ca325dd4902851ac5493cd70bf0385be90014bb03e4ca59681db6075385eda12854b6fd39ff7d
|
data/lib/gitlab_git/git_stats.rb
CHANGED
@@ -10,9 +10,14 @@ module Gitlab
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def log
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
log = nil
|
14
|
+
Grit::Git.with_timeout(15) do
|
15
|
+
# Limit log to 8k commits to avoid timeout for huge projects
|
16
|
+
args = ['-8000', '--format=%aN%x0a%aE%x0a%cd', '--date=short', '--shortstat', '--no-merges']
|
17
|
+
log = repo.git.run(nil, 'log', nil, {}, args)
|
18
|
+
end
|
19
|
+
|
20
|
+
log
|
16
21
|
rescue Grit::Git::GitTimeout
|
17
22
|
nil
|
18
23
|
end
|
@@ -14,9 +14,11 @@ module Gitlab
|
|
14
14
|
entry[:author_email] = slice[1]
|
15
15
|
entry[:date] = slice[2]
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
if slice[4]
|
18
|
+
changes = slice[4].split(",")
|
19
|
+
entry[:additions] = changes[1].to_i unless changes[1].nil?
|
20
|
+
entry[:deletions] = changes[2].to_i unless changes[2].nil?
|
21
|
+
end
|
20
22
|
|
21
23
|
collection.push(entry)
|
22
24
|
end
|