2011-10-20 19:00:00 +00:00
|
|
|
require 'grit'
|
2012-04-20 22:26:22 +00:00
|
|
|
require 'pygments'
|
2011-10-20 19:00:00 +00:00
|
|
|
|
|
|
|
Grit::Blob.class_eval do
|
2012-04-20 21:21:12 +00:00
|
|
|
include Linguist::BlobHelper
|
2011-10-20 19:00:00 +00:00
|
|
|
end
|
2011-10-24 19:38:03 +00:00
|
|
|
|
2011-12-30 14:26:13 +00:00
|
|
|
#monkey patch raw_object from string
|
|
|
|
Grit::GitRuby::Internal::RawObject.class_eval do
|
|
|
|
def content
|
2012-03-02 16:42:28 +00:00
|
|
|
@content
|
2011-12-30 14:26:13 +00:00
|
|
|
end
|
2012-04-11 20:03:56 +00:00
|
|
|
end
|
2011-12-30 14:26:13 +00:00
|
|
|
|
2012-04-04 22:51:49 +00:00
|
|
|
|
2012-04-20 21:21:12 +00:00
|
|
|
Grit::Diff.class_eval do
|
2012-04-11 20:03:56 +00:00
|
|
|
def old_path
|
2012-05-26 10:37:49 +00:00
|
|
|
Gitlab::Encode.utf8 a_path
|
2012-04-11 20:03:56 +00:00
|
|
|
end
|
2012-04-04 22:51:49 +00:00
|
|
|
|
2012-04-11 20:03:56 +00:00
|
|
|
def new_path
|
2012-05-26 10:37:49 +00:00
|
|
|
Gitlab::Encode.utf8 b_path
|
2012-04-04 22:51:49 +00:00
|
|
|
end
|
2011-12-30 14:26:13 +00:00
|
|
|
end
|
|
|
|
|
2011-11-25 20:18:36 +00:00
|
|
|
Grit::Git.git_timeout = GIT_OPTS["git_timeout"]
|
|
|
|
Grit::Git.git_max_size = GIT_OPTS["git_max_size"]
|