Commit 11865ee2 authored by Gabriel Mazetto's avatar Gabriel Mazetto

We need `sha` reference from `diff_base_commit` to generate the diff

parent a9b2a274
......@@ -332,14 +332,14 @@ class MergeRequest < ActiveRecord::Base
#
# see "git diff"
def to_diff
target_project.repository.diff_text(diff_base_commit, source_sha)
target_project.repository.diff_text(diff_base_commit.sha, source_sha)
end
# Returns the commit as a series of email patches.
#
# see "git format-patch"
def to_patch
target_project.repository.format_patch(diff_base_commit, source_sha)
target_project.repository.format_patch(diff_base_commit.sha, source_sha)
end
def hook_attrs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment