diff options
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 436a06ee9b..779fd644d3 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -195,7 +195,16 @@ func Diff(ctx *context.Context) { } func RawDiff(ctx *context.Context) { - panic("not implemented") + diff, err := models.GetRawDiff( + models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name), + ctx.Params(":sha"), + ctx.Params(":ext"), + ) + if err != nil { + ctx.Handle(404, "GetRawDiff", err) + return + } + ctx.HandleText(200, diff) } func CompareDiff(ctx *context.Context) { |