gitlab_git 7.2.9 → 7.2.10

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: 093a48bc5387399df0b770442205dbc5d782f840
4
- data.tar.gz: 9bbc121aad494a63764ff35f97332fce368883b6
3
+ metadata.gz: d1290b38048656f160076eb75a8a63da82bae5f1
4
+ data.tar.gz: 1c25bce20c683335d52a6ea10b6e53c3098c69fe
5
5
  SHA512:
6
- metadata.gz: c655e5aa4856d822a7b5e46b12efa7da8494226edeee121c8622148d7c239f262c8e95ead052fc159b20e5be210a24519c5b791ca717322aada3d8923399d19e
7
- data.tar.gz: 276b8610c80c368daedb4f793311fc86564eb64b5f916d8f7b251b9635a4799e1d87ddfb9a8073db75d5c45ee58a67262e4e8d675bb152fa8be2dd37a8e4ab0e
6
+ metadata.gz: eed11049f16e49ed1ffdf8aab4bbfe2798fc7dccb4b1a5838eb587c74c7d3ee59c15549a7d52a566856f200b1fba7ca0bcf1809068e3d2a6a676ff9cb174de30
7
+ data.tar.gz: c34ff60bb71241ebbc42426ec81663826d91ff9969b06d9ad65ce985e8c0fac51c48ff618e4e4862de45dfd50741f0feb762b5bb89010d8f4dc042bf5f90a504
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.2.9
1
+ 7.2.10
@@ -127,10 +127,13 @@ module Gitlab
127
127
  index.remove(file[:path])
128
128
  else
129
129
  content = file[:content]
130
+ detect = CharlockHolmes::EncodingDetector.new.detect(content) if content
130
131
 
131
- # When writing to the repo directly as we are doing here,
132
- # the `core.autocrlf` config isn't taken into account.
133
- content.gsub!("\r\n", "\n") if repository.autocrlf
132
+ unless detect && detect[:type] == :binary
133
+ # When writing to the repo directly as we are doing here,
134
+ # the `core.autocrlf` config isn't taken into account.
135
+ content.gsub!("\r\n", "\n") if repository.autocrlf
136
+ end
134
137
 
135
138
  oid = repo.write(content, :blob)
136
139
  index.add(path: file[:path], oid: oid, mode: 0100644)
@@ -280,18 +280,19 @@ module Gitlab
280
280
  sha = sha_from_ref(actual_ref)
281
281
  repo = options[:repo]
282
282
 
283
- cmd = %W(git -C #{path} log)
284
- cmd << %W(-n #{options[:limit].to_i})
285
- cmd << %W(--skip=#{options[:offset].to_i})
286
- cmd << %W(--follow) if options[:follow]
287
- cmd << %W(--no-merges) if options[:skip_merges]
288
- cmd << sha
289
- cmd << %W(-- #{options[:path]}) if options[:path]
290
-
291
- raw_output = IO.popen(cmd.flatten) {|io| io.read }
292
-
293
- log = raw_output.scan(/commit\ ([0-9a-f]{40})/).flatten.map do |c|
294
- Rugged::Commit.new(rugged, c)
283
+ cmd = %W(git --git-dir=#{path} log)
284
+ cmd += %W(-n #{options[:limit].to_i})
285
+ cmd += %W(--format=%H)
286
+ cmd += %W(--skip=#{options[:offset].to_i})
287
+ cmd += %W(--follow) if options[:follow]
288
+ cmd += %W(--no-merges) if options[:skip_merges]
289
+ cmd += [sha]
290
+ cmd += %W(-- #{options[:path]}) if options[:path]
291
+
292
+ raw_output = IO.popen(cmd) {|io| io.read }
293
+
294
+ log = raw_output.lines.map do |c|
295
+ Rugged::Commit.new(rugged, c.strip)
295
296
  end
296
297
 
297
298
  log.is_a?(Array) ? log : []
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: 7.2.9
4
+ version: 7.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Zaporozhets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-06 00:00:00.000000000 Z
11
+ date: 2015-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gitlab-linguist
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.4.3
111
+ rubygems_version: 2.2.2
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Gitlab::Git library