diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-06-20 19:51:48 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-07 01:50:58 +0300 |
commit | a9fa45f09e6b6188691f37d75883b22edce7bba1 (patch) | |
tree | 93072651554f59e90c0c2a72761c2bb7f7edc719 /app/models/commit.rb | |
parent | 6ce25e7b4caa9e94de74378729178c7060d640b2 (diff) |
Represent DiffRefs as proper class instead of tuple array
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 174ccbaea6c..2ef3973c160 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -214,6 +214,13 @@ class Commit @raw.short_id(7) end + def diff_refs + Gitlab::Diff::DiffRefs.new( + base_sha: self.parent_id || self.sha, + head_sha: self.sha + ) + end + def pipelines @pipeline ||= project.pipelines.where(sha: sha) end |