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 +4 -4
- data/VERSION +1 -1
- data/lib/gitlab_git/blob.rb +6 -3
- data/lib/gitlab_git/repository.rb +13 -12
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1290b38048656f160076eb75a8a63da82bae5f1
|
4
|
+
data.tar.gz: 1c25bce20c683335d52a6ea10b6e53c3098c69fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eed11049f16e49ed1ffdf8aab4bbfe2798fc7dccb4b1a5838eb587c74c7d3ee59c15549a7d52a566856f200b1fba7ca0bcf1809068e3d2a6a676ff9cb174de30
|
7
|
+
data.tar.gz: c34ff60bb71241ebbc42426ec81663826d91ff9969b06d9ad65ce985e8c0fac51c48ff618e4e4862de45dfd50741f0feb762b5bb89010d8f4dc042bf5f90a504
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.2.
|
1
|
+
7.2.10
|
data/lib/gitlab_git/blob.rb
CHANGED
@@ -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
|
-
|
132
|
-
|
133
|
-
|
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 -
|
284
|
-
cmd
|
285
|
-
cmd
|
286
|
-
cmd
|
287
|
-
cmd
|
288
|
-
cmd
|
289
|
-
cmd
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
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.
|
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-
|
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.
|
111
|
+
rubygems_version: 2.2.2
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Gitlab::Git library
|