gitlab_git 10.1.4 → 10.2.0
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 +4 -4
- data/VERSION +1 -1
- data/lib/gitlab_git/blob.rb +1 -1
- data/lib/gitlab_git/repository.rb +14 -0
- 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: e4256a9124c547dd37ad82929922826b549d035e
|
4
|
+
data.tar.gz: 41c5334b6556a1936a5a83888bf30a0f0b6626ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45d7141e374418211be9691de8644deba06f420e53465b53d9bb59571382343c3d750e398b53524f21c50d54a105fe963a282e9fb783a5d6ada1828c90655b50
|
7
|
+
data.tar.gz: c4787ce560bc314df0709c000298faebe77638c6a723bf6e5ba3edb32600f38a5cc30f51bc994ad1789aa8c74bc72f07aa50d4d19a5796f6339d890a1c815526
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
10.
|
1
|
+
10.2.0
|
data/lib/gitlab_git/blob.rb
CHANGED
@@ -110,6 +110,20 @@ module Gitlab
|
|
110
110
|
!!rugged.tags[name]
|
111
111
|
end
|
112
112
|
|
113
|
+
# Returns true if the given branch exists
|
114
|
+
#
|
115
|
+
# name - The name of the branch as a String.
|
116
|
+
def branch_exists?(name)
|
117
|
+
rugged.branches.exists?(name)
|
118
|
+
|
119
|
+
# If the branch name is invalid (e.g. ".foo") Rugged will raise an error.
|
120
|
+
# Whatever code calls this method shouldn't have to deal with that so
|
121
|
+
# instead we just return `false` (which is true since a branch doesn't
|
122
|
+
# exist when it has an invalid name).
|
123
|
+
rescue Rugged::ReferenceError
|
124
|
+
false
|
125
|
+
end
|
126
|
+
|
113
127
|
# Returns an Array of branch and tag names
|
114
128
|
def ref_names
|
115
129
|
branch_names + tag_names
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Zaporozhets
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.2
|
128
|
+
rubygems_version: 2.6.2
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Gitlab::Git library
|