Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Use --no-ext-diff to prevent output being munged by user's diff drivers #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugin/git.vim
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ endfunction

" Show diff.
function! GitDiff(args)
let git_output = s:SystemGit('diff ' . a:args . ' -- ' . s:Expand('%'))
let git_output = s:SystemGit('diff --no-ext-diff' . a:args . ' -- ' . s:Expand('%'))
if !strlen(git_output)
echo "No output from git command"
return
Expand Down Expand Up @@ -138,7 +138,7 @@ function! GitCommit(args)

let args = a:args

if args !~ '\v\k@<!(-a|--all)>' && s:SystemGit('diff --cached --stat') =~ '^\(\s\|\n\)*$'
if args !~ '\v\k@<!(-a|--all)>' && s:SystemGit('diff --no-ext-diff --cached --stat') =~ '^\(\s\|\n\)*$'
let args .= ' -a'
endif

Expand Down