mirror of
https://github.com/tomgi/git_stats.git
synced 2024-09-29 20:21:29 +02:00
Force encoding to utf-8 for other characters
This commit is contained in:
parent
d9a48df271
commit
53e3926833
@ -22,7 +22,7 @@ module GitStats
|
|||||||
end
|
end
|
||||||
|
|
||||||
def binary?
|
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
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
|
Loading…
Reference in New Issue
Block a user