Skip to content
Snippets Groups Projects
Commit 11865ee2 authored by Gabriel Mazetto's avatar Gabriel Mazetto :spy_tone1:
Browse files

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

parent a9b2a274
No related branches found
No related tags found
No related merge requests found
Loading
@@ -332,14 +332,14 @@ class MergeRequest < ActiveRecord::Base
Loading
@@ -332,14 +332,14 @@ class MergeRequest < ActiveRecord::Base
# #
# see "git diff" # see "git diff"
def to_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 end
   
# Returns the commit as a series of email patches. # Returns the commit as a series of email patches.
# #
# see "git format-patch" # see "git format-patch"
def to_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 end
   
def hook_attrs def hook_attrs
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment