Skip to content
Snippets Groups Projects

Bugfix/encoding

Merged gitlab-qa-bot requested to merge github/fork/SaitoWu/bugfix/encoding into master

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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)

  • gitlab-qa-bot
  • 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 means commit, blob, diff, etc.

      But the new version of patch does not patch the RawObject. just patched Grit::(Blob Diff and Commit) Object.

      This lines def data... , just patched blob.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)

  • gitlab-qa-bot
  • 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
  • gitlab-qa-bot
  • 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: SaitoWu

    i'll close these issues one week later!

    By Administrator on 2012-05-30T08:12:16 (imported from GitLab project)

    By Administrator on 2012-05-30T08:12:16 (imported from GitLab)

  • Created by: NARKOZ

    Good job :smile:

    By Administrator on 2012-05-30T08:19:01 (imported from GitLab project)

    By Administrator on 2012-05-30T08:19:01 (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

    @narkoz :beers:

    By Administrator on 2012-05-30T08:35:49 (imported from GitLab project)

    By Administrator on 2012-05-30T08:35:49 (imported from GitLab)

  • Please register or sign in to reply
    Loading