mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 06:43:51 -05:00
Rudimentary support for diff maps for submodules in status
This commit is contained in:
committed by
Tim Pope
parent
a21ca7e86e
commit
973d814e26
@@ -2980,7 +2980,15 @@ function! s:StageDiff(diff) abort
|
|||||||
let lnum = line('.')
|
let lnum = line('.')
|
||||||
let info = s:StageInfo(lnum)
|
let info = s:StageInfo(lnum)
|
||||||
let prefix = info.offset > 0 ? '+' . info.offset : ''
|
let prefix = info.offset > 0 ? '+' . info.offset : ''
|
||||||
if empty(info.paths) && info.section ==# 'Staged'
|
if info.sub =~# '^S'
|
||||||
|
if info.section ==# 'Staged'
|
||||||
|
return 'Git! diff --no-ext-diff --submodule=log --cached -- ' . info.paths[0]
|
||||||
|
elseif info.sub =~# '^SC'
|
||||||
|
return 'Git! diff --no-ext-diff --submodule=log -- ' . info.paths[0]
|
||||||
|
else
|
||||||
|
return 'Git! diff --no-ext-diff --submodule=diff -- ' . info.paths[0]
|
||||||
|
endif
|
||||||
|
elseif empty(info.paths) && info.section ==# 'Staged'
|
||||||
return 'Git! diff --no-ext-diff --cached'
|
return 'Git! diff --no-ext-diff --cached'
|
||||||
elseif empty(info.paths)
|
elseif empty(info.paths)
|
||||||
return 'Git! diff --no-ext-diff'
|
return 'Git! diff --no-ext-diff'
|
||||||
|
|||||||
Reference in New Issue
Block a user