mirror of https://github.com/tomgi/git_stats.git
Force encoding to utf-8 for other characters
This commit is contained in:
parent
d9a48df271
commit
53e3926833
|
@ -22,7 +22,7 @@ module GitStats
|
|||
end
|
||||
|
||||
def binary?
|
||||
repo.run("git cat-file blob #{self.sha} | grep -m 1 '^'") =~ /Binary file/
|
||||
repo.run("git cat-file blob #{self.sha} | grep -m 1 '^'").force_encoding('ISO-8859-1').encode('utf-8', replace: nil) =~ /Binary file/
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
Loading…
Reference in New Issue