diff --git a/lib/hub/commands.rb b/lib/hub/commands.rb index d49a21d4f..658205983 100644 --- a/lib/hub/commands.rb +++ b/lib/hub/commands.rb @@ -919,7 +919,9 @@ def pullrequest_editmsg(changes) msg.puts changes.gsub(/^/, '# ').gsub(/ +$/, '') end } - edit_cmd = Array(git_editor).dup << message_file + edit_cmd = Array(git_editor).dup + edit_cmd << '-c' << 'set ft=gitcommit' if edit_cmd[0] =~ /^[mg]?vim$/ + edit_cmd << message_file system(*edit_cmd) abort "can't open text editor for pull request message" unless $?.success? title, body = read_editmsg(message_file)