Also use ref in Repository#commit
This commit is contained in:
parent
011e281604
commit
93dd8b0a08
|
@ -78,9 +78,9 @@ class Repository
|
|||
end
|
||||
end
|
||||
|
||||
def commit(id = 'HEAD')
|
||||
def commit(ref = 'HEAD')
|
||||
return nil unless exists?
|
||||
commit = Gitlab::Git::Commit.find(raw_repository, id)
|
||||
commit = Gitlab::Git::Commit.find(raw_repository, ref)
|
||||
commit = ::Commit.new(commit, @project) if commit
|
||||
commit
|
||||
rescue Rugged::OdbError
|
||||
|
|
Loading…
Reference in New Issue