gitlab_git 10.6.7 → 10.6.8

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: 1c813eed6119af1e3d95118a8ad959564f086112
4
- data.tar.gz: 43e5e98c37ac60b3d0fa0961adb0f4100e0fb7ab
3
+ metadata.gz: c0988bb5a3617f4bac08f53781bea813be09c7a9
4
+ data.tar.gz: 0ce71e0cf618cf267c0b2ef057cb6153026b6274
5
5
  SHA512:
6
- metadata.gz: be00e50a22b77ea27b52dc3ea4dce30d78c63d5ea5e8144a9c6c4e999800bee02e92caf391b6f5228aec78924ee17c60305119b01aa44364badb761cd4f1dae1
7
- data.tar.gz: 10e1613716b5d75487f608596f6d079d4c6c63445844cfbfcbb5c681327d78b1159803348feaaaa0b0b59bd4cf5836dee46644884d81d9e303950eb6e6d110d3
6
+ metadata.gz: 241ab6732a48d690d39a71d57d8bc311fa7ea7dc5b6fe992fb71ea1e31b407166203c16ebb48762a688933c0a014d92c4138ac1d3abbdaab46e2ecda80f20be6
7
+ data.tar.gz: 904a3b9e9f1c2ded3568c3fbd697bbda11f3c2b20c0fe903bdfeb9cdcd1a89cf386f96c0c6a20dcf4080638798961b6a7b36235e70d5ae94bd00b3c6521d75c5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.6.7
1
+ 10.6.8
@@ -1,10 +1,11 @@
1
1
  module Gitlab
2
2
  module Git
3
3
  class Compare
4
- attr_reader :head, :base
4
+ attr_reader :head, :base, :straight
5
5
 
6
- def initialize(repository, base, head)
6
+ def initialize(repository, base, head, straight = false)
7
7
  @repository = repository
8
+ @straight = straight
8
9
 
9
10
  unless base && head
10
11
  @commits = []
@@ -34,6 +35,7 @@ module Gitlab
34
35
  end
35
36
 
36
37
  paths = options.delete(:paths) || []
38
+ options[:straight] = @straight
37
39
  Gitlab::Git::Diff.between(@repository, @head.id, @base.id, options, *paths)
38
40
  end
39
41
  end
@@ -21,13 +21,22 @@ module Gitlab
21
21
 
22
22
  class << self
23
23
  def between(repo, head, base, options = {}, *paths)
24
- # Only show what is new in the source branch compared to the target branch, not the other way around.
25
- # The linex below with merge_base is equivalent to diff with three dots (git diff branch1...branch2)
26
- # From the git documentation: "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B"
27
- common_commit = repo.merge_base_commit(head, base)
24
+ straight = options.delete(:straight) || false
25
+
26
+ common_commit = if straight
27
+ base
28
+ else
29
+ # Only show what is new in the source branch
30
+ # compared to the target branch, not the other way
31
+ # around. The linex below with merge_base is
32
+ # equivalent to diff with three dots (git diff
33
+ # branch1...branch2) From the git documentation:
34
+ # "git diff A...B" is equivalent to "git diff
35
+ # $(git-merge-base A B) B"
36
+ repo.merge_base_commit(head, base)
37
+ end
28
38
 
29
39
  options ||= {}
30
- break_rewrites = options[:break_rewrites]
31
40
  actual_options = filter_diff_options(options)
32
41
  repo.diff(common_commit, head, actual_options, *paths)
33
42
  end
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.6.7
4
+ version: 10.6.8
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-09-26 00:00:00.000000000 Z
11
+ date: 2016-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.2.5
129
+ rubygems_version: 2.4.8
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Gitlab::Git library