From 4b3c18ce5cbd88156423d89f26b0869f45e2225e Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin <godfat@godfat.org> Date: Thu, 8 Dec 2016 01:13:33 +0800 Subject: [PATCH] Use branch_name to find the branch rather than ref --- app/models/repository.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 8a94fbf3ecc..4d74ac6f585 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -858,9 +858,9 @@ class Repository GitOperationService.new(user, self).with_branch( branch, source_branch: source_branch, - source_project: source_project) do |ref| + source_project: source_project) do index = rugged.index - branch_commit = find_branch(ref) + branch_commit = find_branch(branch) parents = if branch_commit last_commit = branch_commit.dereferenced_target -- GitLab