Merge pull request #195 from bobrik/patch-1

Forcing encoding to UTF-8 for git tree
This commit is contained in:
rick
2011-09-21 19:33:14 -07:00
+3
View File
@@ -158,6 +158,9 @@ module Gollum
def tree!(sha)
tree = @repo.git.native(:ls_tree,
{:r => true, :l => true, :z => true}, sha)
if tree.respond_to?(:force_encoding)
tree.force_encoding("UTF-8")
end
items = tree.split("\0").inject([]) do |memo, line|
memo << parse_tree_line(line)
end