Fix Commit stats and diff encoding issues

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-09-25 15:26:35 +03:00
parent 3a106cbcd3
commit 619c81b488
No known key found for this signature in database
GPG Key ID: 161B5D6A44D3D88A
4 changed files with 5 additions and 11 deletions

View File

@ -32,7 +32,7 @@ gem 'omniauth-shibboleth'
# Extracting information from a git repository
# Provide access to Gitlab::Git library
# gem "gitlab_git", path: '../../gitlab_git'
gem "gitlab_git", git: 'https://gitlab.com/gitlab-org/gitlab_git.git', ref: '187ff05aef6fc5390a2d666f35f84de0db9777b7'
gem "gitlab_git", git: 'https://gitlab.com/gitlab-org/gitlab_git.git', ref: 'b53b948a9248ea3a4b7f2bd6c7f9938fbd5e952b'
# Ruby/Rack Git Smart-HTTP Server Handler
gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'

View File

@ -1,7 +1,7 @@
GIT
remote: https://gitlab.com/gitlab-org/gitlab_git.git
revision: 187ff05aef6fc5390a2d666f35f84de0db9777b7
ref: 187ff05aef6fc5390a2d666f35f84de0db9777b7
revision: b53b948a9248ea3a4b7f2bd6c7f9938fbd5e952b
ref: b53b948a9248ea3a4b7f2bd6c7f9938fbd5e952b
specs:
gitlab_git (7.0.0.pre)
activesupport (~> 4.0)

View File

@ -19,13 +19,7 @@ class Projects::CommitController < Projects::ApplicationController
[]
end
begin
@diffs = @commit.diffs
rescue Grit::Git::GitTimeout
@diffs = []
@diff_timeout = true
end
@diffs = @commit.diffs
@note = project.build_commit_note(commit)
@notes_count = project.notes.for_commit_id(commit.id).count
@notes = project.notes.for_commit_id(@commit.id).not_inline.fresh

View File

@ -5,7 +5,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
before_filter :require_non_empty_project
def stats
@stats = Gitlab::Git::Stats.new(@repository.raw, @repository.root_ref)
@stats = Gitlab::Git::Stats.new(@repository.raw_repository, @repository.root_ref)
@graph = @stats.graph
end