From 1ab674dcca9d608bf3f91e520db5271f40b1f215 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9my=20Coutable?= <remy@rymai.me>
Date: Tue, 28 Mar 2017 14:58:18 +0200
Subject: [PATCH] Fix EE-specific code following gitlab-org/gitlab-ce!9535
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rémy Coutable <remy@rymai.me>
---
 app/models/repository.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/models/repository.rb b/app/models/repository.rb
index f9d78d4a261d..451c6c5047a3 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -1024,7 +1024,7 @@ def upstream_branches
   end
 
   def diverged_from_upstream?(branch_name)
-    branch_commit = commit(branch_name)
+    branch_commit = commit("refs/heads/#{branch_name}")
     upstream_commit = commit("refs/remotes/#{MIRROR_REMOTE}/#{branch_name}")
 
     if upstream_commit
@@ -1035,7 +1035,7 @@ def diverged_from_upstream?(branch_name)
   end
 
   def upstream_has_diverged?(branch_name, remote_ref)
-    branch_commit = commit(branch_name)
+    branch_commit = commit("refs/heads/#{branch_name}")
     upstream_commit = commit("refs/remotes/#{remote_ref}/#{branch_name}")
 
     if upstream_commit
@@ -1046,7 +1046,7 @@ def upstream_has_diverged?(branch_name, remote_ref)
   end
 
   def up_to_date_with_upstream?(branch_name)
-    branch_commit = commit(branch_name)
+    branch_commit = commit("refs/heads/#{branch_name}")
     upstream_commit = commit("refs/remotes/#{MIRROR_REMOTE}/#{branch_name}")
 
     if upstream_commit
-- 
GitLab