gitlab_git 10.1.4 → 10.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca40e178b3dad2259d4b70fd2e9e052f262eba45
4
- data.tar.gz: 93e75607f939236119c2a407d2dd215a0913e3de
3
+ metadata.gz: e4256a9124c547dd37ad82929922826b549d035e
4
+ data.tar.gz: 41c5334b6556a1936a5a83888bf30a0f0b6626ce
5
5
  SHA512:
6
- metadata.gz: 0779c95c3eff35c64508f683d098ce5981e947247a988fa440613b07c05dc026537d673632661364fb75b9ed87d583d0f0574ac4b958918856785ad06316d692
7
- data.tar.gz: 1efe4d02e6446e7cf35339a67375f3924a058a49e7a2450e733c587c49f14670ac8eaa097b32ef73e9521e0ad37f1c0b12070df53fd569ff65fa67383d0d3ddd
6
+ metadata.gz: 45d7141e374418211be9691de8644deba06f420e53465b53d9bb59571382343c3d750e398b53524f21c50d54a105fe963a282e9fb783a5d6ada1828c90655b50
7
+ data.tar.gz: c4787ce560bc314df0709c000298faebe77638c6a723bf6e5ba3edb32600f38a5cc30f51bc994ad1789aa8c74bc72f07aa50d4d19a5796f6339d890a1c815526
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.1.4
1
+ 10.2.0
@@ -267,7 +267,7 @@ module Gitlab
267
267
  end
268
268
 
269
269
  def truncated?
270
- size > @data.size
270
+ size > data.bytes.size
271
271
  end
272
272
 
273
273
  private
@@ -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.1.4
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.5
128
+ rubygems_version: 2.6.2
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Gitlab::Git library