From f96dc6295aeb6f7d731c635c1a8a8ff609b4510f Mon Sep 17 00:00:00 2001
From: Douwe Maan <douwe@gitlab.com>
Date: Fri, 6 Mar 2015 12:25:31 +0100
Subject: [PATCH] Everything from gitlab_git is already UTF-8.

---
 app/controllers/projects/graphs_controller.rb | 4 ++--
 app/models/repository.rb                      | 4 ++--
 app/views/projects/blame/show.html.haml       | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/controllers/projects/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb
index 752474b4a4..6e54af356e 100644
--- a/app/controllers/projects/graphs_controller.rb
+++ b/app/controllers/projects/graphs_controller.rb
@@ -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
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 6117db418a..47758b8ad6 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -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,
         }
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
index 5a33d18e63..4cc1fedb1c 100644
--- a/app/views/projects/blame/show.html.haml
+++ b/app/views/projects/blame/show.html.haml
@@ -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 %>
-- 
2.30.9