summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-11-29 20:06:37 +0200
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-11-29 20:06:37 +0200
commit79b64ef4aced8c030b23b2b7c4aa9b1bea192e1b (patch)
tree5aa826fca9c92dfead1d9241967d673786c9cf1f /app/models/commit.rb
parent958497fecbc630297f2d0d5f7b64b484966ae907 (diff)
downloadgitlab-ce-79b64ef4aced8c030b23b2b7c4aa9b1bea192e1b.tar.gz
fixed merge request diff
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 0884e34225c..c97aec28c72 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -36,4 +36,8 @@ class Commit
def author_name
encode(author.name)
end
+
+ def prev_commit
+ parents.first
+ end
end