gitlab_git 7.2.4 → 7.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d43d1859e1ba560a9b0bef8f3e7648428db5183
4
- data.tar.gz: 45fe03e2f99ab9d0a238daa50c61253fff10128e
3
+ metadata.gz: 77a0966dee4ee400b3d059cf21d5c3011f6892bd
4
+ data.tar.gz: 7b336b8404c2cb023cfe5389fcaa81ca57fc1181
5
5
  SHA512:
6
- metadata.gz: 8bdaa34ce7d4396dba478349431b0ef123249f60a63986413d2b5a4387be4859849693a898c6051c6b9e6b6b3a11b435db86b2b3667a0054e03ef821c8e7a9ef
7
- data.tar.gz: 916c7d976cf401ee50c594b418a3c0562284df425f19b89464afdc9ce6eed929a1b3533194e72565c8f7c24b9b978b8fa10e3514afa0d52082cd6c72612898ee
6
+ metadata.gz: 75d79c89f80a7e030e93f582f2bd0c76d01bb31718619b450b201154260b8843badfcd0854baa4643d2fbb475e46b59e96da42e3d30e80e40eb0a6e7021d7705
7
+ data.tar.gz: 4426e90fffa2b670f0c4e4bf520a5e9057a582349463722249693596ae11a30dc32e8fa3b876dc038e3263a2bd777118eb284f64542100c9b67a3175dc39ea03
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.2.4
1
+ 7.2.5
@@ -126,7 +126,13 @@ module Gitlab
126
126
  if action == :remove
127
127
  index.remove(file[:path])
128
128
  else
129
- oid = repo.write(file[:content], :blob)
129
+ content = file[:content]
130
+
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
134
+
135
+ oid = repo.write(content, :blob)
130
136
  index.add(path: file[:path], oid: oid, mode: 0100644)
131
137
  end
132
138
 
@@ -756,9 +756,18 @@ module Gitlab
756
756
  commits
757
757
  end
758
758
 
759
- # Set the "core.autocrlf" config option to true for this repo.
760
- def enable_autocrlf
761
- rugged.config['core.autocrlf'] = true
759
+ AUTOCRLF_VALUES = {
760
+ "true" => true,
761
+ "false" => false,
762
+ "input" => :input
763
+ }.freeze
764
+
765
+ def autocrlf
766
+ AUTOCRLF_VALUES[rugged.config['core.autocrlf']]
767
+ end
768
+
769
+ def autocrlf=(value)
770
+ rugged.config['core.autocrlf'] = AUTOCRLF_VALUES.invert[value]
762
771
  end
763
772
 
764
773
  private
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
4
+ version: 7.2.5
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-06-20 00:00:00.000000000 Z
11
+ date: 2015-06-22 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.2.2
111
+ rubygems_version: 2.4.8
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Gitlab::Git library