diff options
author | Stan Hu <stanhu@gmail.com> | 2017-08-23 22:06:42 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-08-23 22:07:32 -0700 |
commit | 37904108b965eecabdbe631ca2f3465a3cf18a1e (patch) | |
tree | 14c47e2e4fd27d521d06f2ad63b6e4071167e49f /lib | |
parent | 539ed0a6375d5bb6d734e688b801373e4b8006f9 (diff) | |
download | gitlab-ce-37904108b965eecabdbe631ca2f3465a3cf18a1e.tar.gz |
Fix inconsistent number of branches when remote branches are presentsh-fix-branch-count
Users of project mirrors would see that the number of branches did not
match the number in the branch dropdown because remote branches were
counted when Rugged was in use. With Gitaly, only local branches
are counted.
Closes #36934
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 2 |
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 |