mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 04:53:45 -05:00
Move :Gmerge warning to top level function
The old location isn't long for this world.
This commit is contained in:
@@ -3677,14 +3677,7 @@ function! s:MergeRebase(cmd, bang, mods, args, ...) abort
|
||||
\ . "%+EXUNG \u0110\u1ed8T %.%#,"
|
||||
\ . "%+E\u51b2\u7a81 %.%#,"
|
||||
\ . 'U%\t%f'
|
||||
if a:cmd =~# '^merge' && empty(args) &&
|
||||
\ (had_merge_msg || isdirectory(fugitive#Find('.git/rebase-apply', dir)) ||
|
||||
\ !empty(s:TreeChomp(dir, 'diff-files', '--diff-filter=U')))
|
||||
return 'echohl WarningMsg|echo ":Git merge for loading conflicts is deprecated in favor of :Git mergetool"|echohl NONE|silent Git' . (a:bang ? '!' : '') . ' mergetool'
|
||||
let cmd = g:fugitive_git_executable.' diff-files --name-status --diff-filter=U'
|
||||
else
|
||||
let cmd = s:UserCommand(dir, argv)
|
||||
endif
|
||||
let cmd = s:UserCommand(dir, argv)
|
||||
if !empty($GIT_SEQUENCE_EDITOR) || has('win32')
|
||||
let old_sequence_editor = $GIT_SEQUENCE_EDITOR
|
||||
let $GIT_SEQUENCE_EDITOR = 'true'
|
||||
@@ -3774,6 +3767,13 @@ function! s:RebaseClean(file) abort
|
||||
endfunction
|
||||
|
||||
function! s:MergeSubcommand(line1, line2, range, bang, mods, args) abort
|
||||
let dir = s:Dir()
|
||||
if empty(args) && (
|
||||
\ filereadable(fugitive#Find('.git/MERGE_MSG', dir)) ||
|
||||
\ isdirectory(fugitive#Find('.git/rebase-apply', dir)) ||
|
||||
\ !empty(s:TreeChomp(dir, 'diff-files', '--diff-filter=U')))
|
||||
return 'echohl WarningMsg|echo ":Git merge for loading conflicts is deprecated in favor of :Git mergetool"|echohl NONE|silent Git' . (a:bang ? '!' : '') . ' mergetool'
|
||||
endif
|
||||
return s:MergeRebase('merge', a:bang, a:mods, a:args)
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user