New Feature: Diff patch file export for commit
This commit is contained in:
parent
df6b587f34
commit
335f9d6410
4 changed files with 28 additions and 1 deletions
|
@ -64,4 +64,15 @@ class CommitsController < ApplicationController
|
|||
@commit = Commit.new(older)
|
||||
end
|
||||
end
|
||||
|
||||
def patch
|
||||
@commit = project.commit(params[:id])
|
||||
|
||||
send_data(
|
||||
@commit.to_patch,
|
||||
:type => "text/plain",
|
||||
:disposition => 'attachment',
|
||||
:filename => (@commit.id.to_s + ".patch")
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue