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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f50f9e00d569ecfecbe4adfe97e1fc0d2447c22
4
- data.tar.gz: 27e4b6264bc6ce74b6739aac75e4e19acc040786
3
+ metadata.gz: 6153bb71b711454165303016cafd44943691bcf6
4
+ data.tar.gz: 05faffaaa0c4346fbfda09b80d24692044c7a3c4
5
5
  SHA512:
6
- metadata.gz: 16c170c207b76cfd0dcc369846843c12e9ce4887857002fa5ef828156c9f3266fcc12de2c56f5537641879569f0d1bbc5bbf8de11de4c9e9b8076aee0126c8c5
7
- data.tar.gz: faea583a376c4a040777edcecd0934f2b7384688bc93fc41d078d9463401f28361bbf143a11cbc8dee9498f9cc430b4ac3868d7b2761970691c5b41738ed08b1
6
+ metadata.gz: ae2038afe8f25b18e141969b0099ea3d64fcca4475bfd287f1bc5fd7089c5ee3092d7e36e2191d633b89546c2d6ac941090d7f8ee3198fe1b23e2e7d1af93066
7
+ data.tar.gz: 190841dbc36231e05a999fb3c6f4a848d4e6d5d8d51b85925e3ca325dd4902851ac5493cd70bf0385be90014bb03e4ca59681db6075385eda12854b6fd39ff7d
@@ -10,9 +10,14 @@ module Gitlab
10
10
  end
11
11
 
12
12
  def log
13
- # Limit log to 8k commits to avoid timeout for huge projects
14
- args = ['-8000', '--format=%aN%x0a%aE%x0a%cd', '--date=short', '--shortstat', '--no-merges']
15
- repo.git.run(nil, 'log', nil, {}, args)
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
- changes = slice[4].split(",")
18
- entry[:additions] = changes[1].to_i unless changes[1].nil?
19
- entry[:deletions] = changes[2].to_i unless changes[2].nil?
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Zaporozhets