gitlab_git 10.3.0 → 10.3.1
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 +4 -2
- data/lib/gitlab_git/repository.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55854e0a55dc3bbcfb18be3835834cf99c3f2c26
|
4
|
+
data.tar.gz: 4d174b9be6315b47a1b45ed61e893863c7b3a68e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 560d061fe203d069ee5cff609aa9645ff89bf760e25fe3d3740a6aa8d7bd3e9258bf78382b360cdaa9012cd8e08b0be18874f07c57d86c2a4984441dd52b0d59
|
7
|
+
data.tar.gz: 9a1231145e9cccf76b992a11cdf961e5c161783cb8a6038be15c43dd3a00d562783f7d452c95b74caa01c8ff7de9120e08ad36ffcc5d4aafc97ef3e7f885d95d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
10.3.
|
1
|
+
10.3.1
|
data/lib/gitlab_git/blob.rb
CHANGED
@@ -115,7 +115,8 @@ module Gitlab
|
|
115
115
|
# },
|
116
116
|
# commit: {
|
117
117
|
# message: 'Wow such commit',
|
118
|
-
# branch: 'master'
|
118
|
+
# branch: 'master',
|
119
|
+
# update_ref: false
|
119
120
|
# }
|
120
121
|
#
|
121
122
|
def commit(repository, options, action = :add)
|
@@ -126,6 +127,7 @@ module Gitlab
|
|
126
127
|
commit = options[:commit]
|
127
128
|
repo = repository.rugged
|
128
129
|
ref = commit[:branch]
|
130
|
+
update_ref = commit[:update_ref].nil? ? true : commit[:update_ref]
|
129
131
|
parents = []
|
130
132
|
|
131
133
|
unless ref.start_with?('refs/')
|
@@ -184,7 +186,7 @@ module Gitlab
|
|
184
186
|
opts[:committer] = committer
|
185
187
|
opts[:message] = commit[:message]
|
186
188
|
opts[:parents] = parents
|
187
|
-
opts[:update_ref] = ref
|
189
|
+
opts[:update_ref] = ref if update_ref
|
188
190
|
|
189
191
|
Rugged::Commit.create(repo, opts)
|
190
192
|
end
|
@@ -853,7 +853,8 @@ module Gitlab
|
|
853
853
|
# },
|
854
854
|
# commit: {
|
855
855
|
# message: 'Wow such commit',
|
856
|
-
# branch: 'master'
|
856
|
+
# branch: 'master',
|
857
|
+
# update_ref: false
|
857
858
|
# }
|
858
859
|
def mkdir(path, options = {})
|
859
860
|
# Check if this directory exists; if it does, then don't bother
|
@@ -863,10 +864,13 @@ module Gitlab
|
|
863
864
|
rugged_ref = rugged.ref(ref)
|
864
865
|
|
865
866
|
raise InvalidRef.new("Invalid ref") if rugged_ref.nil?
|
867
|
+
|
866
868
|
target_commit = rugged_ref.target
|
869
|
+
|
867
870
|
raise InvalidRef.new("Invalid target commit") if target_commit.nil?
|
868
871
|
|
869
872
|
entry = tree_entry(target_commit, path)
|
873
|
+
|
870
874
|
if entry
|
871
875
|
if entry[:type] == :blob
|
872
876
|
raise InvalidBlobName.new("Directory already exists as a file")
|
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.3.
|
4
|
+
version: 10.3.1
|
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-07-
|
11
|
+
date: 2016-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-linguist
|