gitlab_git 10.6.4 → 10.6.5

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/blob.rb +6 -4
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5415dadf9d220102e60808ce90da48ae04c01d51
4
- data.tar.gz: 0d50f0dca69aa08ebf13668edc93bbce2a10ea53
3
+ metadata.gz: 3cb54c76a3f5d53c29e936c788772f642fbe8bfb
4
+ data.tar.gz: 9b37e24978c2b08dec01e56e52239d4911fb895b
5
5
  SHA512:
6
- metadata.gz: 55e01cc03c7a744321cb825c568200df8ba55e20f830f85a0b2ffcfb1fba416b399220cce1a444bb5e68cd2d3677a8dc8d61071dd58032dc872240da7f0f654d
7
- data.tar.gz: 8e3c8701cb9f258b0252d9976113d5db8f3185a3e41e9dea0343a229c5265622310232ee5ca79a243620da156319d38bbb628b2b587d11f6f5787ddfef292ceb
6
+ metadata.gz: 5fde0a94a712170d0320f94850fc3662a5447526288d49cfa450ea3a92364c6223ace31bf99816c698504bfac58f100adfe46679c0fb08443f9aef9bfd18c8c8
7
+ data.tar.gz: 6396cfeb6132d169a674418bd7b11aec5be93d7c6ca96bfd385dfab85d712990cd2f38667f58edae7f7784efc18fa40d8b545e505e280380d4a6344315a7abb2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.6.4
1
+ 10.6.5
@@ -131,6 +131,7 @@ module Gitlab
131
131
  ref = commit[:branch]
132
132
  update_ref = commit[:update_ref].nil? ? true : commit[:update_ref]
133
133
  parents = []
134
+ mode = 0o100644
134
135
 
135
136
  unless ref.start_with?('refs/')
136
137
  ref = 'refs/heads/' + ref
@@ -154,17 +155,18 @@ module Gitlab
154
155
  if action == :remove
155
156
  index.remove(filename)
156
157
  else
158
+ file_entry = index.get(filename)
159
+
157
160
  if action == :rename
158
161
  old_path_name = PathHelper.normalize_path(file[:previous_path])
159
162
  old_filename = old_path_name.to_s
160
- index.remove(old_filename)
163
+ file_entry = index.get(old_filename)
164
+ index.remove(old_filename) unless file_entry.blank?
161
165
  end
162
166
 
163
- mode = 0o100644
164
- file_entry = index.get(filename)
165
-
166
167
  if file_entry
167
168
  raise Repository::InvalidBlobName.new("Filename already exists; update not allowed") unless update
169
+
168
170
  # Preserve the current file mode if one is available
169
171
  mode = file_entry[:mode] if file_entry[:mode]
170
172
  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.4
4
+ version: 10.6.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: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2016-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist