gitlab_git 10.4.3 → 10.4.4

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/compare.rb +11 -9
  4. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01b37a892f1f38530140a9011553c495ecc33f23
4
- data.tar.gz: 26cbfd7f959a1f76e54d6244ccbec5c60297c93f
3
+ metadata.gz: addeba465f50470a6fb488b90e4c10fadfe98f83
4
+ data.tar.gz: 38e00284fc964eeb61ab751216b0ba67ae1d5e32
5
5
  SHA512:
6
- metadata.gz: ff5d5c4d4ef411f7d99089d874de79f33ab0be52390d70cdfc81feb97054f13bc6923ac26584ab96d9c326e604f924cfb6fc4debd5ddfc6186f462083b9eb3ae
7
- data.tar.gz: 2cb19139c2a10e5452eaffd3381f25122f656e10da9b8cb5f7e5f5fdb8991e39084c6e3feb1de7f98a5abf07973c5519329a7ea1ae76f70b259ed9f48103d6d4
6
+ metadata.gz: 95b6aa7accdb06990e8d5b0d821ae564c53d5ed616f76da1170c0864e14d92cb44d1f7e22b9d118dbf034bc624a58fcc26d531a0fde16da8959ae7781a55d298
7
+ data.tar.gz: 9479e6617625f25e9b8a35cebf97e4f22d00ba1c58a3c8603b4b2dcfc6ec70b5267a4dc62df3480e2b24144e5621c8f636bc54a1eccce88b8f2871e1638e8ae1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.4.3
1
+ 10.4.4
@@ -1,11 +1,9 @@
1
1
  module Gitlab
2
2
  module Git
3
3
  class Compare
4
- attr_reader :commits, :same, :head, :base
4
+ attr_reader :head, :base
5
5
 
6
6
  def initialize(repository, base, head)
7
- @commits = []
8
- @same = false
9
7
  @repository = repository
10
8
 
11
9
  return unless base && head
@@ -13,14 +11,18 @@ module Gitlab
13
11
  @base = Gitlab::Git::Commit.find(repository, base.try(:strip))
14
12
  @head = Gitlab::Git::Commit.find(repository, head.try(:strip))
15
13
 
16
- return unless @base && @head
14
+ @commits = [] unless @base && @head
15
+ @commits = [] if same
16
+ end
17
17
 
18
- if @base.id == @head.id
19
- @same = true
20
- return
21
- end
18
+ def same
19
+ @base && @head && @base.id == @head.id
20
+ end
21
+
22
+ def commits
23
+ return @commits if defined?(@commits)
22
24
 
23
- @commits = Gitlab::Git::Commit.between(repository, @base.id, @head.id)
25
+ @commits = Gitlab::Git::Commit.between(@repository, @base.id, @head.id)
24
26
  end
25
27
 
26
28
  def diffs(options = {})
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: 10.4.3
4
+ version: 10.4.4
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-08-02 00:00:00.000000000 Z
11
+ date: 2016-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist
@@ -125,8 +125,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.2.5
128
+ rubygems_version: 2.5.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Gitlab::Git library
132
132
  test_files: []
133
+ has_rdoc: