gitlab_git 9.0.0 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/gitlab_git/repository.rb +23 -2
  4. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e997dc18170db77f9b2ffad597f0cc1654f457a8
4
- data.tar.gz: d557e66cdbaa42781d0ad422c91d969cb1a91af6
3
+ metadata.gz: 918fb34f97acc6f5d4065767e005ba2b5ffed166
4
+ data.tar.gz: f16d2885d1c4b20708e3b8483da85d1cd3fefcae
5
5
  SHA512:
6
- metadata.gz: cc478f222265b20bb57a26ec2f85f75863dd5f89a61cba9a9299c999e853a8a69896bcbeec880570f9c69a19fcf04b9285e87242c78519b384b05e3dbe68dd68
7
- data.tar.gz: 753dec7e037607af0ceaf47dd260d061f8799d0b5fd0eab598a048b1765de44e3217ed8f9e0f9041d49dc1c864762b6373dbba4c74213199e5d3ec714fdeba99
6
+ metadata.gz: a38a52b74be4277d930c10b4735dde75e2f6a2040c2f5ceee6710a67da719adc447ea42cb46336371e8a355e0396ebe51e7e08c3ddae567b1cd2bd28ef9816b7
7
+ data.tar.gz: 30ff567681ea48ce8efbe7a86f4092a38a1d3e46097d6b9e04b125365949087d11004cbfadd901bfd57a7d4532ef75056b4bc038b960b1f2de79aca23c2111bc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 9.0.0
1
+ 9.0.1
@@ -240,7 +240,8 @@ module Gitlab
240
240
  path: nil,
241
241
  ref: root_ref,
242
242
  follow: false,
243
- skip_merges: false
243
+ skip_merges: false,
244
+ disable_walk: false
244
245
  }
245
246
 
246
247
  options = default_options.merge(options)
@@ -254,8 +255,28 @@ module Gitlab
254
255
  return []
255
256
  end
256
257
 
257
- repo = options[:repo]
258
+ if can_walk?(options)
259
+ log_by_walk(sha, options)
260
+ else
261
+ log_by_shell(sha, options)
262
+ end
263
+ end
264
+
265
+ def can_walk?(options)
266
+ options[:path].blank? && !options[:skip_merges] && !options[:disable_walk]
267
+ end
268
+
269
+ def log_by_walk(sha, options)
270
+ walk_options = {
271
+ show: sha,
272
+ sort: Rugged::SORT_DATE,
273
+ limit: options[:limit],
274
+ offset: options[:offset]
275
+ }
276
+ Rugged::Walker.walk(rugged, walk_options).to_a
277
+ end
258
278
 
279
+ def log_by_shell(sha, options)
259
280
  cmd = %W(git --git-dir=#{path} log)
260
281
  cmd += %W(-n #{options[:limit].to_i})
261
282
  cmd += %W(--format=%H)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Zaporozhets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist
@@ -111,8 +111,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.2.5
114
+ rubygems_version: 2.5.1
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Gitlab::Git library
118
118
  test_files: []
119
+ has_rdoc: