diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-03 12:26:23 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-03 12:54:33 +0900 |
commit | 3102ca4c6e0b8fa50f56a6a25d8a28c48251d1c6 (patch) | |
tree | 0a08b0353490ef8883ee12bac78ba24535c4abd7 /tool/vcs.rb | |
parent | 17af8bfce6508951edca8650155be5525a894f65 (diff) |
Default GIT external encoding to UTF-8 🤷♂️
And dump the title as US-ASCII.
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r-- | tool/vcs.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb index 56924ff8bc..6c67b9b318 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -32,6 +32,7 @@ if RUBY_VERSION < "2.0" if opts.kind_of?(Hash) dir = opts.delete(:chdir) rest.pop if opts.empty? + opts.delete(:external_encoding) end if block @@ -66,6 +67,7 @@ if RUBY_VERSION < "2.0" if opts.kind_of?(Hash) dir = opts.delete(:chdir) rest.pop if opts.empty? + opts.delete(:external_encoding) end command = command.shelljoin if Array === command @@ -384,8 +386,9 @@ class VCS COMMAND = ENV["GIT"] || 'git' def self.cmd_args(cmds, srcdir = nil) + (opts = cmds.last).kind_of?(Hash) or cmds << (opts = {}) + opts[:external_encoding] ||= "UTF-8" if srcdir and local_path?(srcdir) - (opts = cmds.last).kind_of?(Hash) or cmds << (opts = {}) opts[:chdir] ||= srcdir end cmds |