[#446] small refactoring

This commit is contained in:
Alexander Machehin 2015-03-10 20:54:42 +05:00
parent 4026b75784
commit 1c6f8c5127
1 changed files with 3 additions and 3 deletions

View File

@ -63,9 +63,9 @@ module Project::DefaultBranch
# Private: Set git head. # Private: Set git head.
def set_new_git_head def set_new_git_head
if self.default_branch_changed? && self.repo.branches.map(&:name).include?(self.default_branch) if default_branch_changed? && repo.branches.map(&:name).include?(default_branch)
self.repo.git.send(:'symbolic-ref', {}, 'HEAD', "refs/heads/#{self.default_branch}") repo.git.send(:'symbolic-ref', {}, 'HEAD', "refs/heads/#{default_branch}")
Project.project_aliases(self).update_all default_branch: self.default_branch Project.project_aliases(self).update_all default_branch: default_branch
end end
end end