diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-15 17:06:12 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-15 17:06:12 +0400 |
commit | f19cdee8cc1e85066154d008ee2653d845c9f3cd (patch) | |
tree | 3a9845a6e961903632475a4e3384d425d4e4fe88 /lib | |
parent | 8bfc62fb8b02bde7da97958deb8aeda63581bfce (diff) |
Remove commit_load_context.rb
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/repositories.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index c99c8f7bdfb..af958f06c64 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -124,9 +124,9 @@ module API # GET /projects/:id/repository/commits/:sha/diff get ":id/repository/commits/:sha/diff" do sha = params[:sha] - result = CommitLoadContext.new(user_project, current_user, {id: sha}).execute - not_found! "Commit" unless result[:commit] - result[:commit].diffs + commit = user_project.repository.commit(sha) + not_found! "Commit" unless commit + commit.diffs end # Get a project repository tree |