Bugfix/encoding
Created by: SaitoWu
I've already applied this patch on our Gitlab server.
After patched, all of the 404 and 500 errors are solved.
If u still have encoding problem, please report to me.
Merge request reports
Activity
1 1 require 'grit' 2 2 require 'pygments' 3 3 4 Grit::Git.git_timeout = GIT_OPTS["git_timeout"] 5 Grit::Git.git_max_size = GIT_OPTS["git_max_size"] 6 4 7 Grit::Blob.class_eval do 5 8 include Linguist::BlobHelper 6 end 7 9 8 #monkey patch raw_object from string 9 Grit::GitRuby::Internal::RawObject.class_eval do 10 def content 11 @content 10 def data Created by: dzaporozhets
@SaitoWu Can yo explain me this lines? And does running utf8 on every Raw object cause Grit Memory Max for big commits?
By Administrator on 2012-05-30T07:01:49 (imported from GitLab project)
By Administrator on 2012-05-30T07:01:49 (imported from GitLab)
1 1 require 'grit' 2 2 require 'pygments' 3 3 4 Grit::Git.git_timeout = GIT_OPTS["git_timeout"] 5 Grit::Git.git_max_size = GIT_OPTS["git_max_size"] 6 4 7 Grit::Blob.class_eval do 5 8 include Linguist::BlobHelper 6 end 7 9 8 #monkey patch raw_object from string 9 Grit::GitRuby::Internal::RawObject.class_eval do 10 def content 11 @content 10 def data Created by: SaitoWu
the old version patched
Grit::GitRuby::Internal::RawObject
, this is the Raw object of Grit.Raw
meanscommit, blob, diff, etc.
But the new version of patch does not patch the
RawObject
. just patchedGrit::(Blob Diff and Commit) Object
.This lines
def data...
, just patchedblob.data
. and others monkey patches patched diff and commit.Grit Memory Max for big commits maybe caused by the old version of patch. because the old version does not care binary file.
The new one did on this commit efd9a717 .
By Administrator on 2012-05-30T07:24:17 (imported from GitLab project)
By Administrator on 2012-05-30T07:24:17 (imported from GitLab)
1 1 require 'grit' 2 2 require 'pygments' 3 3 4 Grit::Git.git_timeout = GIT_OPTS["git_timeout"] 5 Grit::Git.git_max_size = GIT_OPTS["git_max_size"] 6 4 7 Grit::Blob.class_eval do 5 8 include Linguist::BlobHelper 6 end 7 9 8 #monkey patch raw_object from string 9 Grit::GitRuby::Internal::RawObject.class_eval do 10 def content 11 @content 10 def data Created by: SaitoWu
I just followed steps from https://github.com/holman/feedback/issues/191 .
Must thanks the github guys.
By Administrator on 2012-05-30T07:23:44 (imported from GitLab project)
By Administrator on 2012-05-30T07:23:44 (imported from GitLab)
1 1 require 'grit' 2 2 require 'pygments' 3 3 4 Grit::Git.git_timeout = GIT_OPTS["git_timeout"] 5 Grit::Git.git_max_size = GIT_OPTS["git_max_size"] 6 4 7 Grit::Blob.class_eval do 5 8 include Linguist::BlobHelper 6 end 7 9 8 #monkey patch raw_object from string 9 Grit::GitRuby::Internal::RawObject.class_eval do 10 def content 11 @content 10 def data Created by: dzaporozhets
@SaitoWu great. I'll merge this one. Thank you
By Administrator on 2012-05-30T07:24:40 (imported from GitLab project)
By Administrator on 2012-05-30T07:24:40 (imported from GitLab)
Created by: smgladkovskiy
sorry - don't solve error 500 on Network page.
Have utf-8 encoded by msysgit console russian symbols (chars are stored like \x0....) in commits...
By Administrator on 2012-05-30T08:22:02 (imported from GitLab project)
By Administrator on 2012-05-30T08:22:02 (imported from GitLab)
Created by: zzjin
wonderful! sloves all the 500 error at my gitlab site! thanks U ALL! (sloved with some codec cannot be displayed.but the others still working)
By Administrator on 2012-05-30T08:26:31 (imported from GitLab project)
By Administrator on 2012-05-30T08:26:31 (imported from GitLab)
Created by: SaitoWu
By Administrator on 2012-05-30T08:35:49 (imported from GitLab project)
By Administrator on 2012-05-30T08:35:49 (imported from GitLab)