We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 667de5a commit fe680f8Copy full SHA for fe680f8
lib/git/lib.rb
@@ -860,10 +860,14 @@ def meets_required_version?
860
861
def command_lines(cmd, opts = [], chdir = true, redirect = '')
862
cmd_op = command(cmd, opts, chdir)
863
- op = cmd_op.encode("UTF-8", "binary", {
864
- :invalid => :replace,
865
- :undef => :replace
866
- })
+ if cmd_op.encoding.name != "UTF-8"
+ op = cmd_op.encode("UTF-8", "binary", {
+ :invalid => :replace,
+ :undef => :replace
867
+ })
868
+ else
869
+ op = cmd_op
870
+ end
871
op.split("\n")
872
end
873
0 commit comments