mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
Revert "Support X for submodules"
I should have looked closer because because I didn't realize "Support X
for submodules" meant "make it do something completely unrelated".
This reverts commit a21ca7e86e.
References https://github.com/tpope/vim-fugitive/issues/1705
This commit is contained in:
@@ -1789,12 +1789,12 @@ function! fugitive#BufReadStatus() abort
|
|||||||
else
|
else
|
||||||
let files = file
|
let files = file
|
||||||
endif
|
endif
|
||||||
let sub = matchstr(line, '^[12u] .. \zs....')
|
|
||||||
if line[2] !=# '.'
|
if line[2] !=# '.'
|
||||||
call add(staged, {'type': 'File', 'status': line[2], 'filename': files, 'sub': sub})
|
call add(staged, {'type': 'File', 'status': line[2], 'filename': files})
|
||||||
endif
|
endif
|
||||||
if line[3] !=# '.'
|
if line[3] !=# '.'
|
||||||
call add(unstaged, {'type': 'File', 'status': get({'C':'M','M':'?','U':'?'}, matchstr(sub, 'S\.*\zs[CMU]'), line[3]), 'filename': file, 'sub': sub})
|
let sub = matchstr(line, '^[12u] .. \zs....')
|
||||||
|
call add(unstaged, {'type': 'File', 'status': get({'C':'M','M':'?','U':'?'}, matchstr(sub, 'S\.*\zs[CMU]'), line[3]), 'filename': file})
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
let i += 1
|
let i += 1
|
||||||
@@ -1844,12 +1844,12 @@ function! fugitive#BufReadStatus() abort
|
|||||||
let i += 1
|
let i += 1
|
||||||
endif
|
endif
|
||||||
if line[0] !~# '[ ?!#]'
|
if line[0] !~# '[ ?!#]'
|
||||||
call add(staged, {'type': 'File', 'status': line[0], 'filename': files, 'sub': ''})
|
call add(staged, {'type': 'File', 'status': line[0], 'filename': files})
|
||||||
endif
|
endif
|
||||||
if line[0:1] ==# '??'
|
if line[0:1] ==# '??'
|
||||||
call add(untracked, {'type': 'File', 'status': line[1], 'filename': files})
|
call add(untracked, {'type': 'File', 'status': line[1], 'filename': files})
|
||||||
elseif line[1] !~# '[ !#]'
|
elseif line[1] !~# '[ !#]'
|
||||||
call add(unstaged, {'type': 'File', 'status': line[1], 'filename': file, 'sub': ''})
|
call add(unstaged, {'type': 'File', 'status': line[1], 'filename': file})
|
||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
endif
|
endif
|
||||||
@@ -3053,7 +3053,6 @@ function! s:StageInfo(...) abort
|
|||||||
\ 'paths': map(reverse(split(text, ' -> ')), 's:Tree() . "/" . v:val'),
|
\ 'paths': map(reverse(split(text, ' -> ')), 's:Tree() . "/" . v:val'),
|
||||||
\ 'commit': matchstr(getline(lnum), '^\%(\%(\x\x\x\)\@!\l\+\s\+\)\=\zs[0-9a-f]\{4,\}\ze '),
|
\ 'commit': matchstr(getline(lnum), '^\%(\%(\x\x\x\)\@!\l\+\s\+\)\=\zs[0-9a-f]\{4,\}\ze '),
|
||||||
\ 'status': matchstr(getline(lnum), '^[A-Z?]\ze \|^\%(\x\x\x\)\@!\l\+\ze [0-9a-f]'),
|
\ 'status': matchstr(getline(lnum), '^[A-Z?]\ze \|^\%(\x\x\x\)\@!\l\+\ze [0-9a-f]'),
|
||||||
\ 'sub': get(get(get(b:fugitive_files, section, {}), text, {}), 'sub', ''),
|
|
||||||
\ 'index': index}
|
\ 'index': index}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -3619,20 +3618,6 @@ function! s:StageDelete(lnum1, lnum2, count) abort
|
|||||||
if empty(info.paths)
|
if empty(info.paths)
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
let sub = get(get(get(b:fugitive_files, info.section, {}), info.filename, {}), 'sub')
|
|
||||||
if sub =~# '^S'
|
|
||||||
if info.status ==# 'A'
|
|
||||||
continue
|
|
||||||
endif
|
|
||||||
if info.section ==# 'Staged'
|
|
||||||
call s:TreeChomp('reset', '--', info.paths[0])
|
|
||||||
endif
|
|
||||||
if info.status =~# '[MD]'
|
|
||||||
call s:TreeChomp('submodule', 'update', '--', info.paths[0])
|
|
||||||
call add(restore, ':Git -C ' . info.relative[0] . ' checkout -')
|
|
||||||
endif
|
|
||||||
continue
|
|
||||||
endif
|
|
||||||
if info.status ==# 'D'
|
if info.status ==# 'D'
|
||||||
let undo = 'GRemove'
|
let undo = 'GRemove'
|
||||||
elseif info.paths[0] =~# '/$'
|
elseif info.paths[0] =~# '/$'
|
||||||
|
|||||||
Reference in New Issue
Block a user