From 011e281604c3217591692bcfa20569eb6aef24cd Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 7 Jul 2016 19:25:05 +0800 Subject: Prefer ref rather than id because id is shadowing database id Some context: http://doc.gitlab.com/ce/api/repository_files.html#get-file-from-repository http://doc.gitlab.com/ce/api/repositories.html#list-repository-tree Slack: https://gitlab.slack.com/archives/questions/p1467890450002077 --- app/models/project.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 029026a4e56..735b9542d14 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -425,8 +425,8 @@ class Project < ActiveRecord::Base container_registry_repository.tags.any? end - def commit(id = 'HEAD') - repository.commit(id) + def commit(ref = 'HEAD') + repository.commit(ref) end def merge_base_commit(first_commit_id, second_commit_id) -- cgit v1.2.1