Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/roles
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-10-15 20:51:11 +0400
committerrandx <dmitriy.zaporozhets@gmail.com>2012-10-15 20:51:11 +0400
commit809aefb828e0d4b5c06304fcde2dcfced66ab4e9 (patch)
tree4b74baaa21cd65ee2ac07d6c79e226f75f540340 /app/roles
parent47d9732a07ef0aa626efdf745d456bff90fe30f8 (diff)
Minor improve to UI and code formatting of gitlab web editor
Diffstat (limited to 'app/roles')
-rw-r--r--app/roles/repository.rb4
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