summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-07-25 16:48:17 -0400
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-08-07 22:34:34 -0400
commitc21ae07e331ca14605410555d0582f14cb661bb6 (patch)
tree1eb80eec41f5d28a36976f411c4b1eb5ba27723b /app/models/commit.rb
parent942bd5b4112d90c66d637ef350b881574de45065 (diff)
downloadgitlab-ce-c21ae07e331ca14605410555d0582f14cb661bb6.tar.gz
Refactor Gitlab::Git::Commit to include a repository
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 7940733f557..96605c9168b 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -55,7 +55,8 @@ class Commit
end
def from_hash(hash, project)
- new(Gitlab::Git::Commit.new(hash), project)
+ raw_commit = Gitlab::Git::Commit.new(project.repository.raw, hash)
+ new(raw_commit, project)
end
def valid_hash?(key)