diff options
author | Stephan I. Böttcher <stephan@vps.psjt.org> | 2019-05-09 22:14:19 +0200 |
---|---|---|
committer | Stephan I. Böttcher <stephan@vps.psjt.org> | 2019-05-09 22:14:19 +0200 |
commit | 4f55d7f09e37d32bcc8152fcfa4cbed2334aefb3 (patch) | |
tree | 94d455f90834cf354dd6f0b405482a0dc965ce82 | |
parent | 89afd0a64110710c135b558614cdd755a181349b (diff) |
Do not abort when UTF-8 names appear in commit history.
From /var/log/apache2/error.log:
[Thu May 09 22:03:12.703603 2019] [cgi:error] [pid 7418] [client 84.146.220.115:35130] AH01215: …/git/dudle/vcs_git.rb:55:in `split': invalid byte sequence in US-ASCII (ArgumentError): …www/dudle/Kutter/edit_columns.cgi, referer: …
-rw-r--r-- | vcs_git.rb | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -52,7 +52,7 @@ class VCS end def VCS.history - log = runcmd(GITCMD, "log", "--format=format:%s\t%ai").split("\n").reverse + log = runcmd(GITCMD, "log", "--format=format:%s\t%ai").force_encoding('utf-8').split("\n").reverse ret = Log.new log.each_with_index{|s,i| a = s.scan(/^([^\t]*)(.*)$/).flatten |