commit 4c0dbb66eb03f3cc5643270bcf3bf4b571472518 (tree)
parent 9118ed27c357d66d8439e984cb5de247a0290be6
Author: Tim Pope <code@tpope.net>
Date: Fri, 2 Aug 2019 13:29:59 -0400
Always use temp file for :Git diff and :Git log
You can use :Git -p log to get a terminal instead.
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -2104,7 +2104,7 @@ function! s:GitCommand(line1, line2, range, count, bang, mods, reg, arg, args) a
let cmd = s:StatusCommand(a:line1, a:line2, a:range, a:count, a:bang, a:mods, a:reg, '', [])
return (empty(cmd) ? 'exe' : cmd) . after
endif
- if a:bang || args[0] =~# '^-P$\|^--no-pager$'
+ if a:bang || args[0] =~# '^-P$\|^--no-pager$\|diff\%(tool\)\@!\|log'
return s:OpenExec((a:count > 0 ? a:count : '') . (a:count ? 'split' : 'edit'), a:mods, args, dir) . after
endif
let git = s:UserCommandList(dir)
diff --git a/doc/fugitive.txt b/doc/fugitive.txt
@@ -26,7 +26,8 @@ that are part of Git repositories).
*fugitive-:Git!*
:Git! {args} Like |:Git|, but capture the output into a temp file,
:Git --no-pager {args} and |:split| that that temp file. Use :0Git to
-:Git -P {args} |:edit| the temp file instead.
+:Git -P {args} |:edit| the temp file instead. A temp file is always
+ used for diff and log commands.
*fugitive-:Gcd*
:Gcd [directory] |:cd| relative to the repository.