зеркало из https://github.com/mislav/hub.git
if `pull-request` editor is vim, set appropriate filetype
This commit is contained in:
Родитель
961f4b5fa1
Коммит
5f546d4242
|
@ -919,7 +919,9 @@ help
|
|||
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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче