From 53f2130e63b2d20a9c3f6f709f38b70cb27a63ab Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Wed, 24 Sep 2014 13:26:53 +0300
Subject: [PATCH] Use new version of gitlab_git with extended rugged usage

---
 Gemfile                 |  4 ++--
 Gemfile.lock            | 20 +++++++++++++-------
 lib/gitlab/diff/file.rb |  2 +-
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/Gemfile b/Gemfile
index cfc205fd866..5c50cb06106 100644
--- a/Gemfile
+++ b/Gemfile
@@ -31,7 +31,7 @@ gem 'omniauth-shibboleth'
 
 # Extracting information from a git repository
 # Provide access to Gitlab::Git library
-gem "gitlab_git", '~> 6.0'
+gem "gitlab_git", '~> 6.0', git: 'https://gitlab.com/gitlab-org/gitlab_git.git', ref: 'c405e4cf147fc5f7b9eae8aabaf3bee695eb2832'
 
 # Ruby/Rack Git Smart-HTTP Server Handler
 gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
@@ -157,7 +157,7 @@ gem "rack-attack"
 # Ace editor
 gem 'ace-rails-ap'
 
-# Keyboard shortcuts 
+# Keyboard shortcuts
 gem 'mousetrap-rails'
 
 # Semantic UI Sass for Sidebar
diff --git a/Gemfile.lock b/Gemfile.lock
index bd7ebf3ef44..21a55ad6562 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,3 +1,15 @@
+GIT
+  remote: https://gitlab.com/gitlab-org/gitlab_git.git
+  revision: c405e4cf147fc5f7b9eae8aabaf3bee695eb2832
+  ref: c405e4cf147fc5f7b9eae8aabaf3bee695eb2832
+  specs:
+    gitlab_git (6.3.0)
+      activesupport (~> 4.0)
+      charlock_holmes (~> 0.6)
+      gitlab-grit (~> 2.6)
+      gitlab-linguist (~> 3.0)
+      rugged (~> 0.21.0)
+
 GEM
   remote: https://rubygems.org/
   specs:
@@ -179,12 +191,6 @@ GEM
       mime-types (~> 1.19)
     gitlab_emoji (0.0.1.1)
       emoji (~> 1.0.1)
-    gitlab_git (6.3.0)
-      activesupport (~> 4.0)
-      charlock_holmes (~> 0.6)
-      gitlab-grit (~> 2.6)
-      gitlab-linguist (~> 3.0)
-      rugged (~> 0.21.0)
     gitlab_meta (7.0)
     gitlab_omniauth-ldap (1.1.0)
       net-ldap (~> 0.7.0)
@@ -617,7 +623,7 @@ DEPENDENCIES
   gitlab-grack (~> 2.0.0.pre)
   gitlab-linguist (~> 3.0.0)
   gitlab_emoji (~> 0.0.1.1)
-  gitlab_git (~> 6.0)
+  gitlab_git (~> 6.0)!
   gitlab_meta (= 7.0)
   gitlab_omniauth-ldap (= 1.1.0)
   gollum-lib (~> 3.0.0)
diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb
index 19a1198c68c..4daf65331e8 100644
--- a/lib/gitlab/diff/file.rb
+++ b/lib/gitlab/diff/file.rb
@@ -24,7 +24,7 @@ module Gitlab
       end
 
       def raw_diff
-        diff.diff
+        diff.diff.to_s
       end
 
       def next_line(index)
-- 
GitLab