Commit 309f588d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix-encoding' into 'master'

Minor cleanup around UTF-8 encoding.

Minor cleanup to be merged after https://dev.gitlab.org/gitlab/gitlab_git/merge_requests/24 is merged in.

See merge request !1642
parents b8f5e23f 7f4cffd8
......@@ -7,7 +7,7 @@ class Projects::BlameController < Projects::ApplicationController
before_filter :authorize_download_code!
def show
@blob = @repository.blob_at(@commit.id, @path)
@blame = Gitlab::Git::Blame.new(project.repository, @commit.id, @path)
@blame = Gitlab::Git::Blame.new(@repository, @commit.id, @path)
@blob = @blame.blob
end
end
......@@ -28,8 +28,8 @@ class Projects::GraphsController < Projects::ApplicationController
@commits.each do |commit|
@log << {
author_name: commit.author_name.force_encoding('UTF-8'),
author_email: commit.author_email.force_encoding('UTF-8'),
author_name: commit.author_name,
author_email: commit.author_email,
date: commit.committed_date.strftime("%Y-%m-%d")
}
end
......
......@@ -136,8 +136,8 @@ class Repository
commit = Gitlab::Git::Commit.new(rugged_commit)
{
author_name: commit.author_name.force_encoding('UTF-8'),
author_email: commit.author_email.force_encoding('UTF-8'),
author_name: commit.author_name,
author_email: commit.author_email,
additions: commit.stats.additions,
deletions: commit.stats.deletions,
}
......
......@@ -30,5 +30,5 @@
%code
:erb
<% lines.each do |line| %>
<%= highlight(@blob.name, line.force_encoding("utf-8"), true).html_safe %>
<%= highlight(@blob.name, line, true).html_safe %>
<% end %>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment