summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-08-24 07:42:30 +0000
committerDouwe Maan <douwe@gitlab.com>2017-08-24 07:42:30 +0000
commit93ad83443a4d3b929e817d0dce174cda9aff3393 (patch)
treed1f6fb050bc88a503a720a317253547bb7224006 /lib
parent19dfd9e9d6cf8c260dea6a339b1842fc2399729e (diff)
parent37904108b965eecabdbe631ca2f3465a3cf18a1e (diff)
downloadgitlab-ce-93ad83443a4d3b929e817d0dce174cda9aff3393.tar.gz
Merge branch 'sh-fix-branch-count' into 'master'
Fix inconsistent number of branches when remote branches are present Closes #36934 See merge request !13784
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index eb3731ba35a..f5747951d5e 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -153,7 +153,7 @@ module Gitlab
if is_enabled
gitaly_ref_client.count_branch_names
else
- rugged.branches.count do |ref|
+ rugged.branches.each(:local).count do |ref|
begin
ref.name && ref.target # ensures the branch is valid