diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-10-15 20:51:11 +0400 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-10-15 20:51:11 +0400 |
commit | 809aefb828e0d4b5c06304fcde2dcfced66ab4e9 (patch) | |
tree | 4b74baaa21cd65ee2ac07d6c79e226f75f540340 /app/roles | |
parent | 47d9732a07ef0aa626efdf745d456bff90fe30f8 (diff) |
Minor improve to UI and code formatting of gitlab web editor
Diffstat (limited to 'app/roles')
-rw-r--r-- | app/roles/repository.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/roles/repository.rb b/app/roles/repository.rb index 35093a2fc75..88fd90d061f 100644 --- a/app/roles/repository.rb +++ b/app/roles/repository.rb @@ -32,6 +32,10 @@ module Repository Commit.commits(repo, ref, path, limit, offset) end + def last_commit_for(ref, path = nil) + commits(ref, path, 1).first + end + def commits_between(from, to) Commit.commits_between(repo, from, to) end |