gitlab_git 10.4.7 → 10.5.0

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/repository.rb +18 -0
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a1c7dec012b47904d58b7d8ef8adb1f76a2c556
4
- data.tar.gz: a37b66014d4dd31dee64b5aadacca4e14c469f6c
3
+ metadata.gz: 5186b04c57f9ce96224e1ce5b567a935d3f87937
4
+ data.tar.gz: edd381e264f533ebfd893e3be1c1b53f4f09bf91
5
5
  SHA512:
6
- metadata.gz: 0d685a610aaee21807530b519571b93aef5f122b9b8ad4c8a5440788acff6941e0e55b5fd465dd3d64f4db8f9e525d7e662e1a4be95439873b400716a28f5ada
7
- data.tar.gz: a71f1e508aee384030f1850cbb7739da9cf82b8b35555569836fb39989afa9624ef0b5e0941d4b4762c1075b039fc834c1c7bd31130bdab3ca6e5890ac27bdea
6
+ metadata.gz: a07ce78888f76148a23822e49dd79707d47d0cb9f7ce1ae4f14b3053ad124865a7ddcd6089419ecab7524ae24e76e39a95a620cfa3ec75f2098ffb19bceafc0d
7
+ data.tar.gz: b8721276ada106d0da73fce92d27f67e4004cf994f32d691d10e239ad898c52b4cd5a2f367948ca7da6ca4f41c1a839829879f67b1452964a6d65abca6f0368f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.4.7
1
+ 10.5.0
@@ -70,6 +70,24 @@ module Gitlab
70
70
  end.compact.sort_by(&:name)
71
71
  end
72
72
 
73
+ def reload_rugged
74
+ @rugged = nil
75
+ end
76
+
77
+ # Directly find a branch with a simple name (e.g. master)
78
+ #
79
+ # force_reload causes a new Rugged repository to be instantiated
80
+ #
81
+ # This is to work around a bug in libgit2 that causes in-memory refs to
82
+ # be stale/invalid when packed-refs is changed.
83
+ # See https://gitlab.com/gitlab-org/gitlab-ce/issues/15392#note_14538333
84
+ def find_branch(name, force_reload = false)
85
+ reload_rugged if force_reload
86
+
87
+ rugged_ref = rugged.branches[name]
88
+ Branch.new(self, rugged_ref.name, rugged_ref.target) if rugged_ref
89
+ end
90
+
73
91
  def local_branches
74
92
  rugged.branches.each(:local).map do |branch|
75
93
  Branch.new(self, branch.name, branch.target)
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.4.7
4
+ version: 10.5.0
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-08-17 00:00:00.000000000 Z
11
+ date: 2016-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist
@@ -125,9 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.5.1
128
+ rubygems_version: 2.2.5
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Gitlab::Git library
132
132
  test_files: []
133
- has_rdoc: