Remove junk

This commit is contained in:
Tim Pope
2014-06-21 15:35:47 -04:00
parent 0d7cb020bd
commit 021918c3f6

View File

@@ -956,74 +956,6 @@ function! s:StagePatch(lnum1,lnum2) abort
return 'checktime'
endfunction
" Section: Gpush, Gfetch
let s:errorformat = ''
\ . 'CONFLICT (%m): Merge %.%# %f,'
\ . 'CONFLICT (%m): %f %.%#,'
\ . 'U%\t%f,'
\ . '%tRROR: %m,'
\ . '%trror: %m,'
\ . '%tarning: %m,'
\ . '%Ausage: %m,'
\ . '%Efatal: %m,'
\ . '%+ECannot %.%#: %.%#,'
\ . '%C%m,'
\ . '%+ITo %.%#,'
\ . '%+IFrom %.%#,'
\ . '%+I %.%# -> %.%#,'
\ . '%-G%.%#'
let s:errorformat = ''
\ . 'CONFLICT (%m): Merge %.%# %f,'
\ . 'CONFLICT (%m): %f %.%#,'
\ . '%+A%\w%\t%f,'
\ . '%+EERROR: %.%#,'
\ . '%+Eerror: %.%#,'
\ . '%+Wwarning: %.%#,'
\ . '%+Iusage: %.%#,'
\ . '%+Efatal: %.%#,'
\ . '%+ECannot %.%#: %.%#,'
\ . '%-G%.%#%\rhihihi%.%\+'
call s:command("-nargs=? -bang Gpush execute s:Dispatch('<bang>', 'push --progress '.<q-args>)")
call s:command("-nargs=? -bang Gfetch execute s:Dispatch('<bang>', 'fetch --progress '.<q-args>)")
function! fugitive#cwindow() abort
if empty(filter(getqflist(), 'v:val.valid'))
cclose
else
copen
wincmd p
endif
endfunction
function! s:Dispatch(bang, args)
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
let cwd = getcwd()
let [mp, efm, cc] = [&l:mp, &l:efm, get(b:, 'current_compiler', '')]
try
let b:current_compiler = 'git'
let &l:errorformat = s:errorformat
let &l:makeprg = g:fugitive_git_executable . ' ' . a:args
cclose
execute cd fnameescape(s:repo().tree())
if exists(':Make') == 2
execute 'Make'.a:bang
elseif !empty(a:bang)
call feedkeys(":redraw!|call fugitive#cwindow()\r", 'n')
silent make!
else
call feedkeys(":redraw!\r", 'n')
silent make!
endif
finally
let [&l:mp, &l:efm, b:current_compiler] = [mp, efm, cc]
if empty(cc) | unlet! b:current_compiler | endif
execute cd fnameescape(cwd)
endtry
endfunction
" Section: Gcommit
call s:command("-nargs=? -complete=customlist,s:CommitComplete Gcommit :execute s:Commit(<q-args>)")
@@ -1125,93 +1057,6 @@ function! s:FinishCommit() abort
return ''
endfunction
" Section: Gpull, Gmerge
call s:command("-nargs=? -bang Gpull :execute s:Merge('pull --progress', <bang>0, <q-args>)")
call s:command("-nargs=? -bang -complete=customlist,s:EditComplete Gmerge " .
\ "execute s:Merge('merge', <bang>0, <q-args>)")
function! s:Merge(cmd, bang, args) abort
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
let cwd = getcwd()
let [mp, efm] = [&l:mp, &l:efm]
try
" Automatic merge went well; stopped before committing as requested
let ourefm = ''
\ . '%-G%.%#%\e%.%#,'
\ . '%-Gerror:%.%#false''.,'
\ . '%-G%.%# ''git commit'' %.%#,'
\ . '%+Eerror:%.%#,'
\ . '%+Efatal:%.%#,'
\ . '%+ECannot %.%#: %.%#,'
\ . '%+EThere is no tracking information for the current branch.,'
\ . '%+EYou are not currently on a branch. Please specify which,'
\ . 'CONFLICT (%m): %f deleted in %.%#,'
\ . 'CONFLICT (%m): Merge conflict in %f,'
\ . 'CONFLICT (%m): Rename \"%f\"->%.%#,'
\ . 'CONFLICT (%m): Rename %.%#->%f %.%#,'
\ . 'CONFLICT (%m): There is a directory with name %f in %.%#,'
\ . '%+ECONFLICT %.%#,'
\ . '%+EKONFLIKT %.%#,'
\ . '%+ECONFLIT %.%#,'
\ . "%+EXUNG \u0110\u1ed8T %.%#,"
\ . "%+E\u51b2\u7a81 %.%#,"
\ . '%m%\t%f,'
\ . '%\t%f'
let &l:errorformat = ourefm
let &l:makeprg = s:sub(g:fugitive_git_executable.' -c core.editor=false '.
\ a:cmd . (a:args =~# ' \%(--no-edit\|--abort\|-m\)\>' ? '' : ' --edit') . ' ' . a:args,
\ ' *$', '')
if !empty($GIT_EDITOR)
let old_editor = $GIT_EDITOR
let $GIT_EDITOR = 'false'
endif
execute cd fnameescape(s:repo().tree())
let err = ''
cclose
try
silent make!
redraw!
if &efm != ourefm
verbose set efm?
endif
catch /^Vim\%((\a\+)\)\=:E211/
let err = v:exception
endtry
call fugitive#reload_status()
if empty(filter(getqflist(),'v:val.valid'))
for file in ['MERGE_MSG', 'SQUASH_MSG']
if filereadable(s:repo().dir(file))
return 'Gcommit --no-status -t '.s:shellesc(s:repo().dir(file))
endif
endfor
endif
let qflist = getqflist()
let found = 0
for e in qflist
if !empty(e.bufnr) && e.text =~# '..\|U'
let found = 1
let e.pattern = '^<<<<<<<'
endif
endfor
if found
call setqflist(qflist, 'r')
endif
return 'botr cwindow|wincmd p' . (empty(err) ? '' : '|echoerr '.string(err))
finally
let [&l:mp, &l:efm] = [mp, efm]
if exists('old_editor')
let $GIT_EDITOR = old_editor
endif
execute cd fnameescape(cwd)
endtry
endfunction
augroup fugitive_commit
autocmd!
autocmd VimLeavePre,BufDelete COMMIT_EDITMSG execute s:sub(s:FinishCommit(), '^echoerr (.*)', 'echohl ErrorMsg|echo \1|echohl NONE')
augroup END
" Section: Ggrep, Glog
if !exists('g:fugitive_summary_format')