Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20_grit_ext.rb « gitlabhq « initializers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 13e692cf20d5851f62a88df3ab6828b6e8d196db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'grit'
require 'pygments'

Grit::Blob.class_eval do
  include Linguist::BlobHelper
end

#monkey patch raw_object from string
Grit::GitRuby::Internal::RawObject.class_eval do
  def content
    @content
  end
end


Grit::Diff.class_eval do
  def old_path
    Gitlabhq::Encode.utf8 a_path
  end

  def new_path
    Gitlabhq::Encode.utf8 b_path
  end
end

Grit::Git.git_timeout = GIT_OPTS["git_timeout"]
Grit::Git.git_max_size = GIT_OPTS["git_max_size"]