Commit 93dd8b0a authored by Lin Jen-Shin's avatar Lin Jen-Shin

Also use ref in Repository#commit

parent 011e2816
...@@ -78,9 +78,9 @@ class Repository ...@@ -78,9 +78,9 @@ class Repository
end end
end end
def commit(id = 'HEAD') def commit(ref = 'HEAD')
return nil unless exists? 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 = ::Commit.new(commit, @project) if commit
commit commit
rescue Rugged::OdbError rescue Rugged::OdbError
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment