Project

General

Profile

Defect #21141 ยป 0001-Force-encoding-of-git-branches-and-tags-to-UTF-8.patch

Holger Just, 2015-11-03 19:57

View differences:

lib/redmine/scm/adapters/git_adapter.rb
86 86
              bran.revision =  branch_rev[3]
87 87
              bran.scmid    =  branch_rev[3]
88 88
              bran.is_default = ( branch_rev[1] == '*' )
89
              bran.force_encoding("UTF-8") if bran.respond_to?(:force_encoding)
89 90
              @branches << bran
90 91
            end
91 92
          end
......
99 100
          @tags = []
100 101
          cmd_args = %w|tag|
101 102
          git_cmd(cmd_args) do |io|
102
            @tags = io.readlines.sort!.map{|t| t.strip}
103
            @tags = io.readlines.sort!.map do |tag|
104
              tag = tag.strip
105
              tag.force_encoding("UTF-8") if tag.respond_to?(:force_encoding)
106
              tag
107
            end
103 108
          end
104 109
          @tags
105 110
        rescue ScmCommandAborted
    (1-1/1)