forcing encoding to UTF-8 for git tree to be able to use gollum with non-ascii wiki filenames

This commit is contained in:
Ian Babrou
2011-09-09 17:24:19 +04:00
parent 9ce4f0220e
commit 685cc358b3
+1
View File
@@ -158,6 +158,7 @@ module Gollum
def tree!(sha)
tree = @repo.git.native(:ls_tree,
{:r => true, :l => true, :z => true}, sha)
tree.force_encoding("UTF-8")
items = tree.split("\0").inject([]) do |memo, line|
memo << parse_tree_line(line)
end